1.0.10 • Published 7 years ago
eryue v1.0.10
A better way to experience koa2 !
let`s go to see the HelloWorld !
first, you have to add a .babelrc file:
{
"presets": [
['env', {
"targets": {
"node": "current"
}
}]
],
"plugins": ["transform-decorators-legacy", "transform-class-properties"]
}
then, add a entry file, like start.js:
require('babel-core/register');
require('./hello_world');
hello_world.js
import { startApp, Router } from 'eryue';
@Router.get({
'/': 'Hello, world !'
})
class App {
port = 1234
}
startApp(App).then(port => console.log(`a app started at port: ${port} !`));
last, startup !
npm i -D babel-core babel-plugin-transform-class-properties babel-plugin-transform-decorators-legacy babel-preset-env
node start
1.0.10
7 years ago
1.0.9
7 years ago
1.0.8
7 years ago
1.0.7
7 years ago
1.0.6
7 years ago
1.0.5
7 years ago
1.0.5-beta
7 years ago
1.0.4-beta
7 years ago
1.0.3
7 years ago
1.0.3-beta
7 years ago
1.0.2-beta
7 years ago
1.0.1-beta
7 years ago
1.0.1
7 years ago
1.0.0-beta
7 years ago