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

ES6 OR ES5 #54

Open
ghassanmas opened this issue Nov 30, 2017 · 0 comments
Open

ES6 OR ES5 #54

ghassanmas opened this issue Nov 30, 2017 · 0 comments
Assignees

Comments

@ghassanmas
Copy link

ghassanmas commented Nov 30, 2017

Mixed code using both ES6 and ES5
ES6 Code in router.js
const {handleHome, handleStatic,handleRequest, handleError} = require("./handler.js");
ES5 code in router.js

`function router (request, response) {
let baseUrl = request.url;
if (baseUrl === "/") {
// console.log(baseUrl);
handleHome(request, response);

} else if (baseUrl.split('?')[0] === '/submit') {
// console.log(baseUrl);
handleRequest(request,response);

} else {
// console.log(baseUrl);
handleStatic(request, response);
}
}
`

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

2 participants