Created
July 20, 2020 18:08
-
-
Save dev-sankhadip/a835f6498059e24918dfb680dfbbfa9b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import express from 'express'; | |
import dotenv from 'dotenv'; | |
import { StudentDA } from './DA/index'; | |
import { StudentService } from './service/index'; | |
import { StudentRouter } from "./routes/index"; | |
dotenv.config(); | |
const app = express(); | |
const router = express.Router(); | |
app.use(express.json()) | |
app.use(express.urlencoded({ extended: true })) | |
app.use('/', router); | |
StudentRouter(router, new StudentService(new StudentDA())); | |
app.listen(process.env.PORT, () => { | |
console.log(`server running on ${process.env.PORT}`); | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment