Initial commit.
This commit is contained in:
commit
0335f5aa93
1168 changed files with 261999 additions and 0 deletions
server
26
server/app.js
Normal file
26
server/app.js
Normal file
|
@ -0,0 +1,26 @@
|
|||
'use strict';
|
||||
|
||||
angular.module('ffffng').factory('app', function (fs) {
|
||||
var express = require('express');
|
||||
var app = express();
|
||||
|
||||
app.use(express.bodyParser());
|
||||
|
||||
var clientDir = __dirname + '/../client';
|
||||
|
||||
app.use('/', express.static(clientDir + '/'));
|
||||
app.get('/', function (req, res, next) {
|
||||
fs.readFile(clientDir + '/index.html', 'utf8', function (err, body) {
|
||||
if (err) {
|
||||
return next(err);
|
||||
}
|
||||
|
||||
res.writeHead(200, {'Content-Type': 'text/html'});
|
||||
res.end(body);
|
||||
|
||||
return next();
|
||||
});
|
||||
});
|
||||
|
||||
return app;
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue