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;
|
const PORT = process.env.APP_PORT || 4010;
|
||||||
|
|
||||||
createConnection()
|
createConnection()
|
||||||
.then((connection) => {
|
.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}`);
|
|
||||||
});
|
|
||||||
})
|
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
consola.error(err);
|
consola.error(err);
|
||||||
|
})
|
||||||
|
.finally(() => {
|
||||||
app.get('/', (req, res) => {
|
app.get('/', (req, res) => {
|
||||||
const encoded = jwt.sign({ key: 'value' }, 'secret');
|
const encoded = jwt.sign({ key: 'value' }, 'secret');
|
||||||
consola.info(encoded);
|
consola.info(encoded);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user