https://github.com/noherczeg/non-static-proxy-stub
A Webpack based proxy stub for proxy-ing only non static sources
https://github.com/noherczeg/non-static-proxy-stub
example proxy webpack
Last synced: 2 months ago
JSON representation
A Webpack based proxy stub for proxy-ing only non static sources
- Host: GitHub
- URL: https://github.com/noherczeg/non-static-proxy-stub
- Owner: noherczeg
- Created: 2017-12-03T17:04:08.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-12-03T17:27:59.000Z (over 7 years ago)
- Last Synced: 2025-02-01T16:48:46.546Z (4 months ago)
- Topics: example, proxy, webpack
- Language: JavaScript
- Size: 1.95 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# non-static-proxy-stub
A Webpack based proxy stub for proxy-ing only non static sources.## Use case
Consider the following:You are developing the frontend part of an application which consists of
a codebase where the web-sources are embedded into another technology
(e.g. Java, .Net, etc..) and since the sources are embedded you need to
go through a slow build process to check any change you made to your
static sources.Let's say the sources are served through a path: `/assets`, and said
static sources reside in that folder.You don't need anything special, but one thing: to proxy backend calls
to the the backend part of the application, and leave everything else
as-is.This Seed covers this very scenario and nothing more.
## Usage
Copy the following files to your static sources root:
- package.json
- index.js (necessary for Webpack to function)
- webpack.config.jsSince this scenario is only valid in development it's advised to copy the
`.gitignore` file as well (there is no need for NPM dependencies in
production).Then run:
```
npm install
npm start
```Your sources will be served at: [http://localhost:9002](http://localhost:9002)
For further configuration please check the `webpack.config.js` file!