Hello world

This article discusses the basic steps to building a simple hello-world project with a hyron

you can clone & run this example on github : https://github.com/thangdjw/hyron-helloworld

Step 1 : Install Hyron CLI

YARN
NPM
YARN
yarn global add @hyron/cli
NPM
npm i -g @hyron/cli

Step 2 : Add JSON build file

./app.json
{
"base_url" : "http://localhost:3000",
"services" : {
"demo" : "./demo.js"
}
}

Step 3 : Add controller file

./demo.js
module.exports = class {
static requestConfig(){
return {
sayHello : "get"
}
}
sayHello(name){
return "hello world !"+name;
}
}

Step 4 : Run application

Using @hyron/cli
Using hyron
Using @hyron/cli
hyron start app.json
Using hyron
const hyron = require('hyron');
hyron.build("./app.json");
Result
GET http://localhost:3000/demo/say-hello?name=thangphung