Skip to content

CBIIT/nci-webtools-dccps-cedcd

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CEDCD

Cancer Epidemiology Descriptive Cohort Database

CEDCD Dev Startup

Run the following commands in Terminal. Copy and paste with Ctrl + C and Ctrl + Shift + V.

  1. Clone the git repository 1.1. Navigate terminal to where you want to save the project and run the following command (If you are using Windows, git bash works fine)

    git clone https://github.com/CBIIT/nci-webtools-dccps-cedcd.git
  2. Go to the root directory

    cd nci-webtools-dccps-cedcd/
  3. Install the packages needed for the project

    npm install
  4. Go to the client directory

    cd client
  5. Install the packages needed for the client

    npm install
  6. Now we need to do some setup in the backend side! If you don't have mysql installed, then perform the following steps First, return to the directory where you cloned the project

    cd ..
    cd ..
  7. Clone the portable-wamp from the following git repository

    git clone https://github.com/park-brian/portable-wamp
  8. Enter the folder

    cd portable-wamp
  9. run the setup scripts

    ./setup.sh
  10. Open a new terminal (or Git Bash) and navigate to your current location

  11. In this terminal, run the sql server script

    ./start_mysqld.sh
  12. Go back to the first terminal and first copy some files that we will need later on into this folder So, go back to the directory with the two cloned repositories in it

    cd ..

    Copy some sql files over

    cp nci-webtools-dccps-cedcd/database/Schema/cedcd_Tables.sql portable-wamp/cedcd-dev-20190627.sql
    cp nci-webtools-dccps-cedcd/database/Schema/cedcd_StoredProcedures.sql portable-wamp/cedcd_StoredProcedures.sql
  13. Now navigate back into the portable-wamp folder

    cd portable-wamp

    And run the mysql script

    ./start_mysql.sh

    This should lead to a prompt that looks like the following

    mysql>
  14. We need to create a new user by typing in the following

    CREATE USER 'username'@'%' IDENTIFIED BY 'password';

    Replace username and password with the username and password given to you by someone with access to the servers We give this user rights by doing the following

    GRANT ALL PRIVILEGES ON *.* TO 'username'@'%';
  15. Awesome! Now we need to create the database that we will be using We will create a new database using the following command

    CREATE DATABASE cedcd;

    Now enter the database by using the following command

    USE cedcd;

    We need to import the tables and procedures from the two files we copied over into the database

    SOURCE cedcd-dev-20190627.sql;
    SOURCE cedcd_StoredProccedures.sql;

    Congratulations! The sql server is ready to go! Exit the mysql prompt with the following command

    \q
  16. Now, we need to create the configuration file. Go back into nci-webtools-dccps-cedcd folder

    cd ..
    cd nci-webtools-dccps-cedcd

    copy the .env.example to .env modify the values in .env accordingly.

    If need to test the login module locally, according to the OAuth call back url, it may need to update local network hosts configuration.

  17. You're almost there! Now we have to build the client. First, we go to client folder.

    cd ..
    cd client

    To build, run the following command.

    npm start-script build

    We need to copy the build files into a www folder, so do this by using the following commands

    mkdir www
    cp -r build/* www/
  18. Now, we can run the client. Use the following commands to go to the webtool's root folder and run index.js.

    cd ..
    cd ..
    node index.js

    The terminal should display something along the lines of the following

    $ cd ..
    
    $ cd ..
    
    $ node index.js
    Project CEDCD listening on port:8221
  19. Everything should be working now, and you can just open up your browser of choice and go to the following link

    http://localhost:8221/

About

CEDCD (part of CEC)

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 9

Languages