Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/trustyoo86/parcel-browsersync-proxy-example
parcel-bundler + express + browsersync proxy example
https://github.com/trustyoo86/parcel-browsersync-proxy-example
browserify es6 javscript parcel parcel-bundler
Last synced: 19 days ago
JSON representation
parcel-bundler + express + browsersync proxy example
- Host: GitHub
- URL: https://github.com/trustyoo86/parcel-browsersync-proxy-example
- Owner: trustyoo86
- Created: 2018-02-21T03:04:12.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2023-02-28T19:01:44.000Z (almost 2 years ago)
- Last Synced: 2024-04-18T08:33:56.979Z (9 months ago)
- Topics: browserify, es6, javscript, parcel, parcel-bundler
- Language: JavaScript
- Size: 2.37 MB
- Stars: 7
- Watchers: 2
- Forks: 5
- Open Issues: 9
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# parcel-bundler + express + browsersync proxy example
parcel-bundler browsersync server proxy example
parcel-bundler's dev server does not provide a server proxy for the rest api.
so, I bundled through parcel-bundler using js files and use browser-sync and proxy middleware to communicate with the REST api server.
## Prerequisites
fork github repo.
```bash
git clone https://github.com/trustyoo86/parcel-browsersync-proxy-example.git
```Run npm install or yarn install in the project folder
```bash
# npm
npm install
# yarn
yarn install
```## usage
### development mode
Run the express server at the terminal
```bash
# npm
npm run server
# yarn
yarn server
```Run the dev mode of parcel-bundler another termnial
```bash
# npm
npm run dev
# yarn
yarn dev
```### production mode
Run the express server at the terminal with NODE_ENV=production
``` bash
# npm
npm run prod
# yarn
yarn prod
```