You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
350 B
TypeScript
21 lines
350 B
TypeScript
import express from 'express'
|
|
import routes from './routes/index'
|
|
|
|
const app = express();
|
|
const port = 3000;
|
|
|
|
|
|
// app.get('/api', (req, res) => {
|
|
// res.send('welcome to api');
|
|
// })
|
|
|
|
app.use('/api', routes)
|
|
|
|
// start Express server
|
|
|
|
app.listen(port, () => {
|
|
console.log(`server started at http://localhost:${port}`);
|
|
})
|
|
|
|
|
|
export default app; |