fin-serve

1.6.2 • Public • Published

FIN-SERVE

Maintenance status published on npm!

Purpose:

Fin-Serve is a very simple http server. Written in node with few deps, it aims to simply serve up compiled frontend assets without regards to routing. It will look in /dist for compiled assets. You should compile them before trying to run this.

Setup:

npm install will install the two deps (serve-static and finalhandler), as well as the dev deps used for testing.

Use:

npm install fin-serve to add the package to your project. After compiling assets, NODE_ENV=production npm start after configuring your webpack to listen to this middleware will launch a server looking at the static assets in ./dist/.

TODO: explain how to add it to the babel config.

Extra:

You may pass fin-serve additional env vars that will show up in the header to be parsed by the application later. All you need to do is append META_TAG_ to the front of whatever env var you'd like to appear as a parsable header, using a query to grab it like: document.queryselector('meta[name="YOUR_ENV_VAR"]').

Testing:

Run npm test after install dev dependencies.

Readme

Keywords

Package Sidebar

Install

npm i fin-serve

Weekly Downloads

1

Version

1.6.2

License

ISC

Unpacked Size

5.13 kB

Total Files

5

Last publish

Collaborators

  • s-taylor
  • one19