Application examples example.js

I am starting an express.js project. I want to see the exit code for large applications, especially their file system structure. Does anyone know apps that use express.js and are on github?

+7
source share
7 answers

Here is my layout.

./myapp ./public -- static files ./modules -- modules I made for reusability ./routes -- like controllers ./log -- app log file ./views -- ejs views ./config -- config.development.js, config.global.js ./templates -- email templates (text/html in ejs) ./pid -- for server ./init -- git post-receive hook for deploy ./models -- mongoose schemas 
+4
source

Take a look at my answer on ExpressJS. How to structure the application . You can also see the repository for my own website , which, although not large and interesting, is an express application and has a fairly normal file system and code organization diagram (IMHO).

Check out the list of ExpressJS applications on the main Express website . Not sure if there is open source, but check them out.

+3
source

Express is notorious for the fact that it does not have specific recommendations on how to lay out the folder structure and create large applications. In fairness, it should be noted that it is not intended for "Rails", it is rather a lightweight layer that simplifies the basic functions of HTTP.

There may be some quick examples on Github, but none of them have a head.

You can see RailwayJS , which is much closer to the expected "Rails" on top of Express. You can also take a look at Geddy , which is used for large-scale applications. Geddy is not based on Express, but has a clearer guide on how to structure everything.

+3
source

In my express application, I have more or less this structure:

 project |--app.js |--bin | `--shell scripts and stuff* |--docroot | `--static files, etc* |--node_modules | `--npm downloads go here* |--lib | |--vendor | | `--jar files and stuff* | |--my-custom-middleware1.js | `--my-custom-middleware2.js |--package.json |--README.md `--templates `--a bunch of templates* 

Works well for what I need.

+1
source

This is not a very large-scale project, but it gives you a general idea of ​​how to structure your application. REST API https://github.com/khurrumqureshi/BotnikServer

0
source

Check out the express examples you can find in the github repository. If you are in MVC, there is also an example for it. They give you a good first idea on how to structure your application.

For more information on how to structure your application, see the faq expression in the section "How do I configure the application?"

0
source

There are many apps on github that use express. For a large project, you can look at krakenjs.com. Which is not really an application, but more structure for the application that was created by paypal when they switched from java to node.js.

You can also see more complete stack application structures such as mean.io or meanjs.org if you want to use angular.js and mongodb. Even if you do not, you can understand how they structure their code.

0
source

All Articles