Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

express.js sample apps [closed]

I am starting an express.js project. I want to look at code of exiting large apps, especially their file system structure. Anyone knows of apps that use express.js and are on github?

like image 300
Yaron Naveh Avatar asked Oct 23 '12 17:10

Yaron Naveh


3 Answers

Here's 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
like image 109
chovy Avatar answered Sep 24 '22 02:09

chovy


Take a look at my answer to ExpressJS How to structure an application. You can also look at the repo for my own web site, which although neither large nor exciting, is an express app and has a pretty sane filesystem and code organization scheme (IMHO).

Of coures, browse the list of ExpressJS applications on the main Express site. Not sure which if any are open source, but have a look through those.

like image 40
Peter Lyons Avatar answered Sep 21 '22 02:09

Peter Lyons


Express is kind of notorious for not really having any specific guidance on how to lay out the folder structure and build big apps. To be fair, it's not really intended to be a "Rails", it's more of a light layer that simplifies basic HTTP features.

There may be some Express examples on Github, but none off the top of my head.

You may want to take a look at RailwayJS which is a lot closer to the expected "Rails" on top of Express. You may also want to take a look at Geddy which is used for large-scale apps. Geddy is not Express-based, but has more explicit guidance on how to structure everything.

like image 41
Gates VP Avatar answered Sep 25 '22 02:09

Gates VP