📜 ⬆️ ⬇️

Express - Sinatra for Node

require.paths.unshift('path/to/express/lib'); require('express'); get('/', function(){ this.redirect('/hello/world') }); get('/hello/world', function(){ return 'Hello World' }); get('/bye/world', function(){ this.render('title.html.haml', { layout: false, locals: { title: 'Bye World' } }); }); run(); 

In an effort to make server-side JavaScript look like Rails or Sinatra, we received Express . Clean and simple. Simple and clean.

')

Source: https://habr.com/ru/post/93359/


All Articles