Skip to content

Commit

Permalink
port config
Browse files Browse the repository at this point in the history
  • Loading branch information
blacktail committed Sep 6, 2013
1 parent e47053f commit cea22b8
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 6 deletions.
5 changes: 3 additions & 2 deletions app.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ var express = require('express'),
cons = require('consolidate'),
utils = require('./lib/utils'),
iolib = require('./lib/io'),
conf = require('./lib/config_util.js'),
Handlebars = require('handlebars');

require('./lib/handlebars_helper')(Handlebars);
Expand Down Expand Up @@ -103,6 +104,6 @@ app.get('/history/:fileName/:pageNo?/:pageSize?', function (req, res) {

iolib.init(io);

server.listen(3000, function (err) {
console.log("Business server listening on port %d in %s mode", 3000, app.settings.env);
server.listen(conf.server.port, function (err) {
console.log("Business server listening on port %d in %s mode", conf.server.port, app.settings.env);
});
3 changes: 3 additions & 0 deletions config/config.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
{
"server": {
"port": 3001
},
"redis": {
"host": "127.0.0.1",
"port": 6379
Expand Down
4 changes: 2 additions & 2 deletions views/edit.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
<meta charset="utf-8">
<title>Edit {{fileName}}</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="/css/startup.css?v=20130906141614%2B0800">
<link rel="stylesheet" href="/css/startup.css?v=20130906205218%2B0800">
</head>
<body>
<div id="main"></div>

<script src="/scripts/startup.js?v=20130906141614%2B0800"></script>
<script src="/scripts/startup.js?v=20130906205218%2B0800"></script>
</body>
</html>
4 changes: 2 additions & 2 deletions views/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
<meta charset="utf-8">
<title>Real Edit</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="/css/startup.css?v=20130906141614%2B0800">
<link rel="stylesheet" href="/css/startup.css?v=20130906205218%2B0800">
</head>
<body>
<div id="main"></div>

<script src="/scripts/startup.js?v=20130906141614%2B0800"></script>
<script src="/scripts/startup.js?v=20130906205218%2B0800"></script>
</body>
</html>

0 comments on commit cea22b8

Please sign in to comment.