Express is a minimal and flexible Node.js web application framework, providing a robust set of features (regex-based routing, sessions, multiple view / templating engines) for building single and multi-page, and hybrid web applications.

learn more… | top users | synonyms (2)

3
votes
2answers
45 views

Node exports, architecture

My project is written in node JS + Express and has the following architecture: routes (e.g controllers) models (stateless functional modules) app Models objects only doing SQL queries like this: ...
5
votes
1answer
157 views

Express.js controller with Node.js style exports.methods

I have some Node/Express.js controllers which implement the exports.method Node module convention. This particular controller also has a few helper methods. The code works fine! However, I'm a ...
4
votes
1answer
49 views

How can I DRY this .ejs file up a bit?

For a few reasons I had to use EJS on a specific page in my Express project. This was previously like 13 lines of code with MustacheJS and a small JSON file. But now that it is hard-coded, it is a ...
3
votes
1answer
100 views

I'm torn between conditionals and abrupt return functions

Which one of these two is better? This one: ...
2
votes
1answer
110 views

Are these architectural styles correct?

I've start learning node, and would like to ask node and express framework gurus out there as to whether or not the following architectural styles are correct. These correspond to node modules, ...
2
votes
1answer
2k views

NodeJs, ExpressJs serving static assets through wildcard rule

I wrote this as a way to deliver static portion of the app. Wondering if there is a better way to write this. As i am new to express. Goal is to let single page app to handle routing as needed. There ...
2
votes
2answers
292 views

Saving and listing Category model

I have this ExpressJS route for saving and listing Category model. ...
0
votes
2answers
3k views

Is there a better way to read json in node

I have this view that populates an unordered list from values in a json file. I am doing this in node. So is there a better way to do this, or a mode 'node-like' way? Can I load the json file without ...
0
votes
1answer
274 views

Express, blade with connect-assets

I have this CoffeeScript code running here (with TZM-Blade) and would like to have your opinion on how to better optimize it. ...
1
vote
1answer
120 views

Render arbitrary jade in express

We've got a "catch-all" in app.js that renders a .jade file if it exists: ...
3
votes
1answer
478 views

Socket.io, Express and Delivering realtime data from backend socket

I've got server running to make serial data available on a TCP/IP port. My goal is to collect data coming from a realtime device connected to the serial port and deliver it to web clients connected to ...