Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/pfrazee/stack-assets-static
serves js, css, images, and fonts
https://github.com/pfrazee/stack-assets-static
Last synced: 14 days ago
JSON representation
serves js, css, images, and fonts
- Host: GitHub
- URL: https://github.com/pfrazee/stack-assets-static
- Owner: pfrazee
- Created: 2015-02-06T03:30:46.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2015-06-24T02:07:39.000Z (over 9 years ago)
- Last Synced: 2024-10-30T15:54:37.788Z (2 months ago)
- Language: JavaScript
- Size: 117 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Stack Assets Server
built for [stack](https://github.com/creationix/stack) but can be used on its own
```js
var stack = require('stack')
require('http').createServer(stack(
require('stack-assets-builder')({ enabled: true, root: __dirname }),
require('stack-assets-static')({ root: __dirname, pages: ['other-page.html'] })
))
```options
- `root`: string, the path to look for the assets in
- `pages`: array(string), html files to load from `/html/*`js files will be looked for under `root+'/js/*'` and hosted at `/js/*`
css files will be looked for under `root+'/css/*'` and hosted at `/css/*`
font files will be looked for under `root+'/fonts/*'` and hosted at `/fonts/*`
image files will be looked for under `root+'/img/*'` and hosted at `/img/*`