Skip to content

Code #22

@sonykec

Description

@sonykec

I'm reviewing the code. And these lines still do not understand them. Could you help me please

In server.js

// serve index
require('./lib/routes').serveIndex(app, configServer.staticFolder);

According to understand, after this line is to run in the index.js
But I do not understand that now makes the file index.js

In index.js

// Load the single view; AngularJS will handle view changes on the front-end
// NB: This needs to be the last route added

exports.serveIndex = function (app, staticFolder) {
app.get('*', function (req, res) {
res.sendFile('index.html', { root: staticFolder });
});
};

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions