Created the shortener server/service

This commit is contained in:
2022-09-06 20:03:33 +02:00
parent 7dcc6a58d7
commit 97a3d218cf

9
server/shortener.ts Normal file

@ -0,0 +1,9 @@
import express, {Express} from 'express';
const app: Express = express();
/** Logs something with a shortener prefix */
const log = (msg: string) => console.log(`[Shortener] ${msg}`);
/** Starts the shortener service */
export const startServer = (port: number = 8672) => app.listen(port, () => log(`Listening on port ${port}`));