• This project
    • Loading...
  • Sign in

fe / yohobuywap-node · Files

Go to a project

GitLab

  • Go to group
  • Project
  • Activity
  • Files
  • Commits
  • Pipelines 0
  • Builds 0
  • Graphs
  • Milestones
  • Issues 0
  • Merge Requests 0
  • Members
  • Labels
  • Wiki
  • Forks
  • Network
  • Create a new issue
  • yohobuywap-node
  • doraemon
  • middleware
  • devtools.js
  • Merge branch 'feature_student' into release/4.9.1 ...
    d063c4d8
    # Conflicts:
    #	apps/activity/controllers/student.js
    #	apps/product/views/action/detail/detail.hbs
    by weiqingting
    2016-08-30 20:28:34 +0800  
    Browse Directory »
devtools.js 351 Bytes
Raw Blame History Permalink
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
'use strict';

const fs = require('fs');
let devHost = '172.16.6.159';

fs.readFile('.devhost', (err, buf)=> {
    if (!err) {
        devHost = JSON.parse(buf.toString()).host;
    }
});

module.exports = () => {
    return (req, res, next) => {
        Object.assign(res.locals, {
            devHost: devHost
        });

        next();
    };
};