9 lines
332 B
TypeScript
9 lines
332 B
TypeScript
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}`)); |