diff options
Diffstat (limited to 'notes.txt')
-rw-r--r-- | notes.txt | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -1,7 +1,13 @@ [express] $ express -do '# npm install -g express' beforehand, express command -generates nice template dir structure to get started +- do '# npm install -g express' beforehand, express command + generates nice template dir structure to get started +- last param in functions usually implies a callback +- app.param + map/assosiate some logic to a 'route parameter(s)', so when you enter such route + you can expect to have a variable filled for you, e.g. route: /sys/:id, let's say + id is 'listdb', then a db would get preloaded by the time we stepped into the route logic +- doing next(new Error('foo')) will stall and end middleware chain [code analysis] # npm install -g jslint |