This repository has been archived on 2024-10-29. You can view files and clone it, but cannot push or open issues or pull requests.
FunctionProject/backend/app.js

19 lines
488 B
JavaScript
Raw Normal View History

2020-03-16 22:55:32 +01:00
/* Modules */
const express = require('express');
const cors = require('cors');
const morgan = require('morgan');
/* Files Imports & Variables */
const { PORT } = require('./assets/config/config');
const app = express();
/* Middlewares */
app.use(cors());
app.use(morgan('dev'));
app.use(express.json());
/* Routes */
app.get('/', (_req, res) => res.send('Hello world!'));
/* Server */
app.listen(PORT, () => console.log('\x1b[36m%s\x1b[0m', `Started on port ${PORT}.`));