main.js
334 Bytes
const fs = require('fs');
const path = require('path');
const express = require('express');
const app = require('./server');
fs.readdirSync(path.resolve(__dirname, 'routes')).forEach((name) => {
require(path.resolve(__dirname, 'routes', name));
});
app.use(express.static(path.resolve(__dirname, 'public')));
app.listen(3429);