Serving static HTML and assets with Express
When starting a project or prototyping w/o server side logic, initially, I use this line (in CoffeScript) to serve plain HTML with some JavaScript, CSS assets, e.g. for a Backbone.JS application:
app.use '/', express.static "#{__dirname}/public"
Written by Uri Sharf
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Express
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#