You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
730 B
25 lines
730 B
import express from "express";
|
|
|
|
require('dotenv').config();
|
|
|
|
import { IngredientsController } from "./controllers/ingredients.controller";
|
|
import { RecipesController } from "./controllers/recipes.controller";
|
|
import { StepsController } from "./controllers/steps.controller";
|
|
|
|
let helmet = require("helmet");
|
|
const app = express();
|
|
app.use(helmet.hidePoweredBy());
|
|
|
|
app.get('/', (req, res) => {
|
|
res.send('Hello from express and typescript !');
|
|
});
|
|
|
|
app.use('/ingredients', IngredientsController);
|
|
app.use('/recipes', RecipesController);
|
|
app.use('/steps', StepsController)
|
|
|
|
const port = process.env.PORT || 3000;
|
|
|
|
export const server = app.listen(port, () => console.log(`App listenning on PORT ${port}`));
|
|
|
|
export default app; |