Express.js update.
This commit is contained in:
parent
26f6ffb88e
commit
caf732a04c
|
@ -4,7 +4,9 @@
|
|||
"license": "MIT",
|
||||
"dependencies": {},
|
||||
"devDependencies": {
|
||||
"express": "~3.6.0",
|
||||
"body-parser": "~1.3.0",
|
||||
"compression": "~1.0.6",
|
||||
"express": "~4.4.1",
|
||||
"glob": "~4.0.2",
|
||||
"grunt": "~0.4.1",
|
||||
"grunt-autoprefixer": "~0.7.4",
|
||||
|
|
|
@ -2,13 +2,16 @@
|
|||
|
||||
angular.module('ffffng').factory('app', function (fs) {
|
||||
var express = require('express');
|
||||
var bodyParser = require('body-parser');
|
||||
var compress = require('compression');
|
||||
|
||||
var app = express();
|
||||
|
||||
app.use(express.bodyParser());
|
||||
app.use(bodyParser());
|
||||
|
||||
var clientDir = __dirname + '/../client';
|
||||
|
||||
app.use(express.compress());
|
||||
app.use(compress());
|
||||
app.use('/', express.static(clientDir + '/'));
|
||||
app.get('/', function (req, res, next) {
|
||||
fs.readFile(clientDir + '/index.html', 'utf8', function (err, body) {
|
||||
|
|
Loading…
Reference in a new issue