Skip to content

jayantkatia/blocksters-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

📝 Institutions-api

Institutions API to server institutes, students and 3rd party verifiers.

🚀 Get Started with the Installation

  1. Required Installations
    1. Install Node.js in your system
    2. Install Docker in your system
    3. Make sure you have make tool installed.
  2. Navigate into the project directory
  3. Run
       npm i -g yarn
       yarn install
       make mysql-docker-run
       make createdb
    This sets up and runs your mysql container, creates db in it.
  4. Create and populate .env file
        # Hard coded values as per the Makefile, make changes accordingly.        
        # For quick setup, some values are already filled.
    
        # DATABASE SERVER
        DB_HOST=127.0.0.1
        DB_USER=root
        DB_PASS=secret
        DB_NAME=institute_api
        DB_PORT=5432
    
        # APPLICATION SERVER
        PORT=4000
        SECRET=blocksters
    
        # NODEMAILER
        MAIL_FROM_NAME=🏫 Thapar Institute
        MAIL_FROM_ADDRESS=<YOUR_MAIL_ADDRESS>
        MAIL_PASS=<YOUR_MAIL_PASSWORD>
    
        # HYPERLEDGER NODE
        HYPERLEDGER_NODE_IP=0.0.0.0:8801
        HYPERLEDGER_NODE_USERNAME=<USERNAME>
        HYPERLEDGER_NODE_PASSWORD=<PASSWORD>
        HYPERLEDGER_CHANNEL=common-channel
        HYPERLEDGER_CHANNEL_CHAINCODE=chaincode1
    
  5. Run
        npm start
    This runs app.js and you are good to go 😉

💜 Development and Contributing

Yes, please! Feel free to contribute, raise issues and recommend best practices. Makefile is your friend.

A few resources: