What is your hint or solution suggestion?
In order to check if the challenge is complete, the fCC testing engine makes a GET request to /_api/routes.js
, which should return the source code of our routes.js
file. However, this GET route is not configured in the fcctesting.js
file supplied when starting the module. To complete this challenge (and the next one), you must add the following routes to the /freeCodeCamp/fcctesting.js
file:
app.route('/_api/routes.js')
.get(function(req, res, next) {
console.log('routes.js requested');
fs.readFile(process.cwd() + '/routes.js', function(err, data) {
if(err) return next(err);
res.send(data.toString());
});
});
app.route('/_api/auth.js')
.get(function(req, res, next) {
console.log('auth.js requested');
fs.readFile(process.cwd() + '/auth.js', function(err, data) {
if(err) return next(err);
res.send(data.toString());
});
});
Challenge: Implementation of Social Authentication
Link to the challenge: