There are many uses for a single-page application. Whether you’re trying to build lighting fast websites, internal landing pages for your team, or customized endpoints for customers, React with Node.js, Express, and webpack is a popular stack to adopt.

But installing React, Node, Express, and Webpack can be time consuming and error prone, especially if you want to host your single-page application in a separate environment from your production code.

Enter, this template: build and host single-page React apps with Node, Express, and Webpack in minutes! No installations, maintenance, or downloads needed.

Get Started

  1. Create a WayScript account and clone the necessary code: Log in, go here, press clone. This duplicates the template to your own WayScript workspace.
  2. Navigate to your cloned lair, go to .triggers file, click on the pre-setup trigger, press 'Test' to install dependencies, build the client bundle, and start the server
  3. You should see a package-lock.json file and build folder get created in your file system
  4. Click on the endpoint URL of the trigger
  5. You should see the application running ('Hello World' is displayed)! Don't worry, this is protected and requires anyone to access to be in your workspace and logged in, you can make this public later in the settings of your lair.
  6. When you are ready to set this live, just go to the deploy tab and press 'Deploy'

Setting your Application Public

Read the WayScript docs on endpoint protection

Common Issues

Issue: MODULE NOT FOUND errors when deploying
Solution: Try deleting your package-lock.json and build folder and re-deploy