Skip to content
Karl Morrison edited this page Sep 22, 2016 · 3 revisions

(I will be updating this as I go along //basickarl)

Serve files

Serves static files

Install: npm install lasso

Use (with babel):

import lasso_middleware from 'lasso/middleware';
app.use(lasso_middleware.serveStatic(__dirname + '/public'));

Now you can access your file at 127.0.0.1:3000/static/your_file.txt. Lasso serves to the /static url directory by default.

Clone this wiki locally