July 2017
Intermediate to advanced
656 pages
16h 1m
English
Let's create a small Express app which we'll be debugging.
On the command line, we execute the following commands:
$ mkdir app $ cd app $ npm init -y $ npm install --save express $ touch index.js
Our index.js file should contain the following:
const express = require('express')
const app = express()
const stylus = require('stylus')
app.get('/some.css', (req, res) => {
const css = stylus(`
body
color:black
`).render()
res.send(css)
})
app.listen(3000)