parent
f854f137e5
commit
529ebb2a8f
13
src/app.ts
13
src/app.ts
|
@ -9,18 +9,11 @@ const app = express();
|
|||
const PORT = process.env.APP_PORT || 4010;
|
||||
|
||||
createConnection()
|
||||
.then((connection) => {
|
||||
app.get('/', (req, res) => {
|
||||
const encoded = jwt.sign({ key: 'value' }, 'secret');
|
||||
consola.info(encoded);
|
||||
return res.send('Express + TypeScript Server');
|
||||
});
|
||||
app.listen(PORT, () => {
|
||||
consola.success(`⚡️[server]: Server is running at http://localhost:${PORT}`);
|
||||
});
|
||||
})
|
||||
.then((connection) => {})
|
||||
.catch((err) => {
|
||||
consola.error(err);
|
||||
})
|
||||
.finally(() => {
|
||||
app.get('/', (req, res) => {
|
||||
const encoded = jwt.sign({ key: 'value' }, 'secret');
|
||||
consola.info(encoded);
|
||||
|
|
Loading…
Reference in New Issue