1.0.1 • Published 4 months ago

generator-express-parcel v1.0.1

Weekly downloads
-
License
UNLICENSED
Repository
github
Last release
4 months ago

Yeoman generator for Express/Parcel monorepo!

GitHub Repository NPM Package Weekly Downloads

This Yeoman generator creates a monorepo with 3 projects:

  • client - which is a Parcel front-end application using React
  • server - which is a Express application
  • shared - which provides a single location to define object models and business logic that can be easily shared to the other projects.

Usage

yo express-parcel

Example

Navigate to an empty folder. This example will use new-web-app

   cd new-web-app
   yo express-parcel
   create package.json
   create .gitignore
   create .vscode\launch.json
   create .vscode\settings.json
   create README.MD
   create src\client\App.tsx
   create src\client\index.css
   create src\client\index.html
   create src\client\index.ts
   create src\client\package.json
   create src\client\yarn.lock
   create src\server\index.ts
   create src\server\package.json
   create src\server\tsconfig.json
   create src\shared\index.ts
   create src\shared\package.json
   create src\shared\tsconfig.json
   create src\client\components\index.ts
   create src\client\components\Layout.tsx
   create src\client\components\Nav.tsx
   create src\client\pages\Home.tsx
   create src\client\pages\index.ts
   create src\client\pages\NotFound.tsx
   create src\client\pages\Weather.tsx
   create src\server\routes\index.ts
   create src\server\routes\weather.ts
   create src\server\static\index.html
   create src\shared\types\Forecast.ts
   create src\shared\types\index.ts
   create src\client\.parcelrc
   create src\server\.env

Changes to package.json were detected.

Running yarn install for you to install the required dependencies.
yarn install v1.22.22
info No lockfile found.
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
[4/4] Building fresh packages...
success Saved lockfile.
Done in 22.42s.

Running the Generated Site

Press F5 to build and run the entire solution. 2 terminals will spawn:

  • ClientRun - which will run the Parcel application in watch mode to ensure that changes to the client app code are built in real time and available to be served by the back-end.

  • ServerRun - which will run the Express application in watch mode to ensure that changes to the server code are built in real time.