sheetaki/api/server.js
2021-04-20 22:02:00 -05:00

18 lines
455 B
JavaScript

const express = require('express');
const app = express();
const data = require('./data/index');
const upload = require('./upload/index');
const bodyParser = require('body-parser');
const port = 3000;
app.use(bodyParser.urlencoded({ extended: true }));
app.use(bodyParser.json());
app.use(express.static('public'));
app.use('/api/data', data);
app.use('/api/upload', upload);
app.listen(port, () => {
console.log(`Listening on port: ${port}`);
});