mirror of
https://github.com/Floriansylvain/CineAllo.git
synced 2026-08-19 19:53:16 +02:00
19 lines
494 B
JavaScript
19 lines
494 B
JavaScript
import express from 'express'
|
|
import logger from 'morgan'
|
|
import * as dotenv from 'dotenv'
|
|
import { showsRouter } from './routes/shows.js'
|
|
|
|
dotenv.config()
|
|
const app = express()
|
|
const port = process.env.CINEALLO_PORT
|
|
|
|
app.use(logger('dev'))
|
|
app.use(express.json())
|
|
app.use(express.urlencoded({ extended: false }))
|
|
|
|
app.get('/', async (req, res, next) => {
|
|
res.send({message:"voila ton index"})
|
|
})
|
|
app.use('/shows', showsRouter)
|
|
|
|
app.listen(port, () => console.log(`Listening on port ${port}`)) |