GithubHelp home page GithubHelp logo

kelyvin / express-env-example Goto Github PK

View Code? Open in Web Editor NEW
136.0 15.0 50.0 9 KB

A sample express environment that is well architected for scale. Read about it here:

Home Page: https://goo.gl/HTvl4X

License: MIT License

HTML 7.04% JavaScript 92.96%
nodejs express expressjs routing guide example routes server

express-env-example's People

Contributors

kelyvin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

express-env-example's Issues

404 page and re-writting

Hi, thanks you a lot for your architecture, it's really great, clean and easy to develop with it.

I just met some errors while I was trying to make my app.

First, when I started the Node Script, it gives me this error : server.create is not a function Well I find a solution re-writting the server/index.js file.

You put the functions directly in the module.exports and I prefer to keep the same logic as the others files, initializing functions Create and Start and then sending them to the module.exports. So my file looks like :

function create(config) {
}
function start() {
}
module.exports = {
    start: start,
    create: create
};

Then I have another error that I can't solve... Before, I used to work with the server.use(function(req,res){}) to check all the pages that are not defined, but I don't really know how to do with your architecture.

I tried to put in the server/routes/index.js after all my differents routes a code like this :

/*404*/
server.use(function(req,res){
	res.status(404);
	res.render('404');
});

But now every pages I want to connect send me to my 404 page... is there anyway to correct this?
I would be so greatful,

Thanks

update ?

Hello,

following your update in march, do you know when you will publish your new version ?

Thanks.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.