Last active
September 20, 2021 08:28
-
-
Save hoangsetup/392d84bc40240ef079493fc82fac4423 to your computer and use it in GitHub Desktop.
This file contains 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
// src/app.ts | |
import express, { Router } from 'express'; | |
import callStateController from './controllers/call.state.controller'; | |
import * as path from 'path'; | |
const app = express(); | |
app.use(express.json()); | |
app.get('/', (req, res) => { | |
res.sendFile(path.join(process.env.PUBLIC_DIR as string, 'index.html')); | |
}); | |
const router = Router(); | |
router.post('/call-states', callStateController.handleNewCallState); | |
app.use('/api/v1', router); | |
export default app; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment