Skip to content
This repository has been archived by the owner on Apr 30, 2019. It is now read-only.

0.9.0

Pre-release
Pre-release
Compare
Choose a tag to compare
@akyoto akyoto released this 01 Feb 05:37

Version 0.9.0 has breaking changes for all projects.
Aero is not a singleton anymore and uses app instances instead.

Fixing existing projects is very easy. Old 0.8.x code:

let aero = require('aero')
aero.get('/', (request, response) => response.end('Hello'))
aero.run()

Needs to be changed to:

let app = require('aero')()
app.get('/', (request, response) => response.end('Hello'))
app.run()

The app constructor also supports a root directory parameter so you can run the app for a subdirectory instead of the current one:

let aero = require('aero')

let app = aero()          // Main app, current directory
let blog = aero('blog')   // Use Aero in 'blog' subdirectory
let admin = aero('admin') // Use Aero in 'admin' subdirectory