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.
- Download or clone the repository to your local machine:
$ git clone https://github.com/opencdms/opencdms-app.git
- Run
npm install
inside the downloaded/cloned folder:
$ npm install
- 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
- To run the Cypress BDD tests run the cypress scripts with below commands in a separate shell window.
$ npm run cy:open
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)"
Follow the below steps for deployment.
-
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.
-
Install PM2 using the following command as a global package.
$ npm i -g pm2
- Build the angular code using the npm script for the desired environment (for example climsoft or opencdms).
$ npm run build:{ENV}
- To kill any existing running deployed processes from server, run the following command.
$ pm2 kill
- To deploy the build generated in step-3 run the following command.
$ pm2 start server.js
The complete Climsoft application documentation will soon be available.
Have a blast. MIT.