https://github.com/rendro/proxydevserver
A proxy development server written in node.js that intercepts configured requests to serve static resources as well as JavaScript and CSS compiled by preprocessors like LESS, browserify or CoffeeScript.
https://github.com/rendro/proxydevserver
Last synced: 5 months ago
JSON representation
A proxy development server written in node.js that intercepts configured requests to serve static resources as well as JavaScript and CSS compiled by preprocessors like LESS, browserify or CoffeeScript.
- Host: GitHub
- URL: https://github.com/rendro/proxydevserver
- Owner: rendro
- Created: 2014-02-03T09:07:56.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2014-02-22T20:19:05.000Z (over 12 years ago)
- Last Synced: 2025-10-15T10:01:07.616Z (9 months ago)
- Language: CoffeeScript
- Homepage:
- Size: 184 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Proxy dev server [](http://badge.fury.io/js/proxydevserver)
The proxydevserver is highly inspired by [KnisterPeters](https://github.com/KnisterPeter) [smaller-dev-server](https://github.com/KnisterPeter/smaller-dev-server). It aims to proxy all requests, intersecting some to serve a fresh set of assets like images, JavaScript or Stylesheets.
Currently it supports the following middelwares:
* LESS.js
* Browserify
## Install
```
$ npm install -g proxydevserver
$ proxydevserver -c config.yml
```
## config.yml
```yml
devserver:
# hostname of the proxy
host: 'localhost'
# port of the proxy
port: 3000
# support live reload
livereload: true
# serve static files
staticDir: './static/'
proxy:
# host of the target server
host: 'localhost'
# port of the target server
port: 8181
middlewares:
# configure less middleware
less:
# url to intersect
src: '/app.css'
# url to rewrite src
dest: '/entry.css'
# less middleware opeions
options:
src: './sourcestyles/'
dest: './static'
compress: false
sourceMap: false
paths:
- './sourceincludes/'
# configure browserify middleware
browserify:
# url to intersect
src: '/app.js'
# url to rewrite src
dest: './static/entry.js'
# browserify options
options:
sourceMap: true
transforms:
- coffeeify
aliases:
- "js/ext/jquery.js#jquery"
paths:
- './sourceincludes/'
```
Credits
-------
Thanks to [SinnerSchrader](http://www.sinnerschrader.com/) for their support and the time to work on this project.