Skip to content
Hyojun Kim edited this page Jun 14, 2016 · 3 revisions

Installing cottage

Run npm install --save cottage in your project directory.

Creating a server

Here are some basic Hello, world! example:

'use strict'; // unnecessary in Node v6

const cottage = require('cottage');

const app = cottage();

app.get('/', function*(req, res) {
    return "Hello, world!";
});

app.listen(8080);
Clone this wiki locally