mirror of https://github.com/codefeathers/magnet
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.
20 lines
517 B
20 lines
517 B
var express = require('express');
|
|
var path = require('path');
|
|
var cookieParser = require('cookie-parser');
|
|
var logger = require('morgan');
|
|
|
|
var indexRouter = require('./routes/index');
|
|
var usersRouter = require('./routes/users');
|
|
|
|
var app = express();
|
|
|
|
app.use(logger('dev'));
|
|
app.use(express.json());
|
|
app.use(express.urlencoded({ extended: false }));
|
|
app.use(cookieParser());
|
|
app.use(express.static(path.join(__dirname, 'public')));
|
|
|
|
app.use('/', indexRouter);
|
|
app.use('/users', usersRouter);
|
|
|
|
module.exports = app;
|
|
|