Skip to content

climsoft/climsoft-app

Repository files navigation

OpenCDMS OpenCDMS App OpenCDMS UI Application contains the frontend client application built using Angular Framework, Reactive Forms and Data models aligned with the Py=Open data models from API.

OpenCDMS App

How to run it locally

  1. Download or clone the repository to your local machine:
$ git clone https://github.com/opencdms/opencdms-app.git
  1. Run npm install inside the downloaded/cloned folder:
$ npm install
  1. Start the dev server by running the command below. Navigate to http://localhost:4200/. The app will automatically reload if you change any of the source files.
$ npm start
  1. To run the Cypress BDD tests run the cypress scripts with below commands in a separate shell window.
$ npm run cy:open

Pre-Deployment Environment setup for NodeJS on Linux

As Pre-requisites please install NodeJS on Linux environment using following steps.

a. Connect to your Linux instance as ec2-user using SSH. b. Install node version manager (nvm) by typing the following at the command line.

$ curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.34.0/install.sh | bash

c. Activate nvm by typing the following at the command line.

$ . ~/.nvm/nvm.sh

d. Use nvm to install the latest version of Node.js by typing the following at the command line. This is automatically install npm as part of installation.

$ nvm install --lts

e. Test that Node.js is installed and running correctly by typing the following at the command line.

$ node -e "console.log('Running Node.js ' + process.version)"

Production Deployment

Follow the below steps for deployment.

  1. Prepare your required environment y installing all the required dependencies including Nodejs, Git, Angular CLI etc. Clone the repository at https://github.com/opencdms/opencdms-app.git. Install the required dependencies using step-2 above.

  2. Install PM2 using the following command as a global package.

$ npm i -g pm2
  1. Build the angular code using the npm script for the desired environment (for example climsoft or opencdms).
$ npm run build:{ENV}
  1. To kill any existing running deployed processes from server, run the following command.
$ pm2 kill
  1. To deploy the build generated in step-3 run the following command.
$ pm2 start server.js

Documentation

The complete Climsoft application documentation will soon be available.

License

Have a blast. MIT.

About

Web-based application that uses the API exposed by climsoft-api

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published