node-less-endpoint
Easily serve a LESS file as CSS from an express endpoint. No grunt/gulp, no build files, no required configuration – just pure data.
Dependencies
Installation
$ npm install node-less-endpoint --save
Usage - Easy Version
Assuming you have the following directory structure:
client/
└── app.less
server/
└── index.js
package.json
Then you can write the following as your server/index.js
:
// server.jsvar LESS = ;var app = ; app; console;app;
And run node server/index.js
.
Now any GET request to localhost:5555/app.css
will compile and serve the LESS file located at ./client/app.less
. Any @import
statements within app.less
will also be included in the final output.
Advanced Usage
app;