gopi-kris / proforma_starter_project

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

PROforma Starter Project

Introduction

The following are instructions for setting up proformajs-vue and running a PROforma application locally.

The instructions have been tested on Ubuntu 22.04 (Linux), however, proformajs-vue will work on other operating systems (Windows, MacOS) as well.

The steps for installing dependencies will vary from one operating system to another.

A fresh installation of Ubuntu 22.04 on a virtual machine should help to avoid dependency issues with your local development environment.

Software dependencies

  • Git
  • Node.js (version 18 is required)

Update and upgrade Ubuntu

Run the following commands on the terminal (CTRL+ALT+T) to update and upgrade existing Ubuntu packages.

foo@bar:~$ sudo apt update
foo@bar:~$ sudo apt upgrade

Installing Git on Ubuntu

Run the following commands on the terminal to install Git.

foo@bar:~$ sudo apt install -y git

Once installed you can run the following command to test the installation. You should see an output similar to the one below.

foo@bar:~$ git --version
git version 2.34.1

Optional

Additional instructions for configuring Git can be found here: https://www.digitalocean.com/community/tutorials/how-to-install-git-on-ubuntu-22-04

Installing Node.js on Ubuntu

Run the following commands on the terminal to remove existing installations of node.js, if any.

foo@bar:~$ sudo apt autoremove
foo@bar:~$ sudo apt purge nodejs

Run the following commands on the terminal to install curl and download Node.js version 18

foo@bar:~$ sudo apt install -y curl
foo@bar:~$ curl -fsSL https://deb.nodesource.com/setup_18.x | sudo -E bash - 

Run the following commands on the terminal to install Node.js

foo@bar:~$ sudo apt install -y nodejs

Once installed you can run the following commands to test the installation and versions of node.js and npm. npm is Node Package Manager that allows the installation of packages to be used with Node.js, such as proformajs-vue.

foo@bar:~$ node -v
v18.19.1
foo@bar:~$ npm -v
10.2.4

Clone proformajs-vue repo

Clone the proformajs-vue git repository to the home directory of the user (or any directory) on Ubuntu and complete installation.

foo@bar:~$ git clone https://gitlab.com/openclinical/proformajs-vue.git

Install proformajs-vue

Change directory to the directory where proformajs-vue repository was cloned

foo@bar:~$ cd proformajs-vue

Run the following command on the terminal to install proformajs-vue

foo@bar:~$ npm install

Run the following command on the terminal to run proformajs-vue

foo@bar:~$ npm run dev

If successful, you should see the following output:

VITE v3.2.5 ready in 238 ms

  ➜  Local:   http://localhost:5173/
  ➜  Network: use --host to expose

Open the URL http://localhost:5173/ in a browser, and you should see something similar to the screenshot below. proformajs-vue_start.png

Load starter model in proformajs-vue

  • Copy and paste the contents in starter_model.json file to the Code section of proformajs-vue.
  • Click Review to execute the model. json_code.png

Exit proformajs-vue

  • CTRL+C in the terminal to exit proformajs-vue.

About

License:Apache License 2.0