Created the shortener server/service
This commit is contained in:
parent
7dcc6a58d7
commit
97a3d218cf
9
server/shortener.ts
Normal file
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}`));
|
Loading…
x
Reference in New Issue
Block a user