Created the shortener server/service

This commit is contained in:
Mathias Wagner 2022-09-06 20:03:33 +02:00
parent 7dcc6a58d7
commit 97a3d218cf
Signed by: Mathias
GPG Key ID: B8DC354B0A1F5B44

9
server/shortener.ts Normal file
View 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}`));