NodeJS
sudo apt install curl
curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash -
sudo apt install nodejs
node --version
npm --version
KoaJS
yarn add koa
or npm install koa
Create a file (koa.js) and paste the following:
const Koa = require('koa');
const app = new Koa();
app.use(async ctx => {
ctx.body = 'Hello World';
});
app.listen(3000, () => console.log('Running on http://localhost:3000/'));
Check http://localhost:3000
Great, it's working!
Top comments (0)