clean up initial route sample

ref #1
This commit is contained in:
Philipp Dormann 2020-11-24 20:08:30 +01:00
parent f854f137e5
commit 529ebb2a8f
1 changed files with 3 additions and 10 deletions

View File

@ -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);