/next-js-zones

Primary LanguageJavaScriptMIT LicenseMIT

Branch Code Coverage Functions Code Coverage Lines Code Coverage Statements Code Coverage

semantic-release code style: prettier

zones

This is a boilerplate React project incorporating NextJS, CICD pipelines, unit testing, quality gates, and code styling. It is useful for ensuring consistent working environments across multiple different applications.

Running

Dependencies

After checking out this repo, run npm install to install dependencies

Running in Dev Mode

Run npm run dev to launch a NextJS development webserver at http://localhost:3000

Running in Production Mode

For convenience and consistency, the preferred method of running in produciton mode is to use Docker. This will best match how an application is running on a shared environment.

Build a Docker image

Create a Docker image from your current source code by running:

npm run docker

Warning You must have Docker Desktop or similar Docker daemon installed and running or the script will fail.

Run a Docker Container

Once the Docker image exists in your registry of choice (local or remote), you can then run the app and specify what port it should run on:

docker run -p 0.0.0.0:3000:3000 zones:latest

If you'd like to run on a different port, replace the first 3000 with the desired port.

Alternative "local" production mode

Alternatively the application can be run locally without using Docker. See NextJS documentation for more details.

Contributing

Add new components and features using npm run generate. See Contributing New Components for more details.