rate/api/src/app.ts
2022-10-10 12:13:31 +02:00

17 lines
408 B
TypeScript

import Server, { Services } from './framework/express/server';
import Mongo from './framework/mongo/mongo';
import ip from "ip";
const PORT = 8000;
const MONGOURI = "mongodb://localhost:27017";
const mongo = new Mongo(MONGOURI);
const services: Services = {
db: mongo.getDb()
}
const server = new Server(services);
server.start(PORT, () => console.log(`Running on http://${ip.address()}:${PORT}`));