cra-server
TypeScript icon, indicating that this package has built-in type declarations

1.0.3 • Public • Published

CRA Server

Simple express static server with opt-in proxy.

How to

npm install --save-dev cra-server

add in yout package.json:

...
"scripts": {
  ...
  "serve": "cra-server"
  ...
}

use env variables

PORT=3000
STATIC_DIR=build
PROXY_PREFIX=/api
PROXY_URL=http://<api-server>

or as cli tool

cra-server -p 3000 -d ./build
  • -p, --port - specify port, by default is 3000
  • -d, --dir - by default is ./build
  • -url, --proxy-url - specify proxy url', optional
  • -prefix, --proxy-prefix - specify proxy prefix, optional

Readme

Keywords

none

Package Sidebar

Install

npm i cra-server

Weekly Downloads

0

Version

1.0.3

License

MIT

Last publish

Collaborators

  • ewgenius