Skip to content

2. Installation

Chandu Nainala edited this page Mar 23, 2023 · 1 revision

Dependencies

Setup:

  • Start Docker.
  • Open your chosen directory in the terminal.
  • Clone the project from Github by running:
git clone https://github.com/NFDI4Chem/nmrium-react-wrapper.git
  • Go to the project directory:
cd nmrium-react-wrapper
  • check out the development branch:
git checkout development

Local Development

  • Builds Docker images:
docker build -t nmrium-rw:dev .
  • Run docker:
docker run \
	-it \
	--rm \
	-v ${PWD}:/app \
	-v /app/node_modules \
	-p 3001:3000 \
	-e CHOKIDAR_USEPOLLING=true \
	nmrium-rw:dev
  • Start the development server by opening a new terminal and running:
npm start

The development server will run on localhost:3000.

Production Mode

To improve the load time, you can run the app in production mode instead:

  • Builds Docker images from the production docker file:
docker build -f Dockerfile.prod -t nmrium-rw:prod -m 8g .
  • Run docker:
docker run -it --rm -p 1337:80 nmrium-rw:prod
  • Start the development server by opening a new terminal and running:
npm run build

The production server will run on localhost:1337.

Clone this wiki locally