1.0.10 • Published 6 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
6 years ago
1.0.9
6 years ago
1.0.8
6 years ago
1.0.7
6 years ago
1.0.6
6 years ago
1.0.5
6 years ago
1.0.5-beta
6 years ago
1.0.4-beta
6 years ago
1.0.3
6 years ago
1.0.3-beta
6 years ago
1.0.2-beta
6 years ago
1.0.1-beta
6 years ago
1.0.1
6 years ago
1.0.0-beta
6 years ago