Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Code #22

Open
sonykec opened this issue Sep 27, 2016 · 0 comments
Open

Code #22

sonykec opened this issue Sep 27, 2016 · 0 comments

Comments

@sonykec
Copy link

sonykec commented Sep 27, 2016

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 });
});
};

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant