-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
/* importar configuracoes do servidor */ | ||
var app = require('./config/server'); | ||
|
||
/* parametrizar a porta de escuta */ | ||
app.listen(80, function() { | ||
console.log('Server running...'); | ||
}); |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
/* importar o modulo do framework express */ | ||
var express = require('express'); | ||
var consign = require('consign'); | ||
var bodyParser = require('body-parser'); | ||
var expressValidator = require('express-validator'); | ||
|
||
/* Init Express server */ | ||
var app = express(); | ||
|
||
/* Setup Express variables 'view engine' and 'views' */ | ||
app.set('view engine', 'ejs'); | ||
app.set('views', './app/views'); | ||
|
||
/* Setup middlewares and assets */ | ||
app.use(express.static('./app/public')); | ||
app.use(bodyParser.urlencoded({extended: true})); | ||
app.use(expressValidator()); | ||
|
||
/* setup consign autoload */ | ||
consign() | ||
.include('app/routes') | ||
.then('app/models') | ||
.then('app/controllers') | ||
.into(app); | ||
|
||
/* exportar o objeto app */ | ||
module.exports = app; |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Large diffs are not rendered by default.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.