1.0.8 • Published 3 years ago

jsapp-starter v1.0.8

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

jsapp-starter

node npm build publish

Node.js project generator for React Full stack Application.

Perquisites

  • node.js 16+
  • npm 8+

Features

  • Generates React Client and Express Server subprojects.
  • Uses npm workspaces to manage both subprojects.
  • Uses Typescript for both server and Client
  • For full features refer to cra-express-ts-starter

Usage

  • Create React/Express fullstack starter app.
$ npx jsapp-starter create-app <my-app>

Run npx jsapp-starter --help or npx jsapp-starter create-app --help for additional options.

  • Start Server
$ cd my-app
$ npm start --workspace=server
  • Start the Cleint
$ cd my-app
$ npm start --workspace=client

Advanced Usage

Development with Proxy Mode

  • Here you run client with react-scripts webpack server and all the Api calls get proxied to SERVER_URL
  • Start server by running npm start --workspace=server
  • Configure client/.env.development and set
PORT=3000
PUBLIC_URL=
REACT_APP_USE_PROXY=true
REACT_APP_SERVER_URL=http://localhost:9000
  • Start Client by running npm start --workspace=client
  • Access application on default location http://localhost:3000

Development in Server Mode

  • Here you build the client application on a watch, and server serves the Client applicaton from build folder
  • Configure server/.env.development and set
PUBLIC_PATH=../client/build
  • Start server by running npm start --workspace=server
  • Configure client/.env.development and set
PUBLIC_URL=http://localhost:9000
REACT_APP_USE_PROXY=false
REACT_APP_SERVER_URL=
  • Start watch on client builds by running npm run watch:dev:build --workspace=client
  • Access application on server's location http://localhost:9000

NOTE: Refer to Project README for additional information.

License

MIT License.

1.0.8

3 years ago

1.0.7

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago