How to use the API.
Download and install XAMPP from https://www.apachefriends.org/download.html.
Start XAMPP and start the Apache and MySQL services.
Import the database from assets/database/ict4d.sql
into MySQL.
Create a database user which can read, write and drop tables in the database. The user should have the following credentials:
username: development
password: test
Download and install Node.js from https://nodejs.org/en/download/.
Install the dependencies using the following command:
cd api
npm install
Create a .env file in the root directory of the project. The .env file should contain the following variables:
# JWT SECRET
JWT_SECRET=your_secret
# MYSQL DATABASE CONFIGURATION
MYSQL_HOST = 'localhost'
MYSQL_USER = 'development'
MYSQL_PASSWORD = 'test'
Start api using the following command:
npm run start
The API is now running on http://localhost:3000.
The API can be accessed using the following endpoints: https://api-semencescertifiees.elch.cc
The API is documented using Postman. The documentation file can be found under assets\postman\ICT4D.postman_collection.json
.
Import the file into Postman to view the documentation.
A in depth documentation of the API can be found on: https://github.com/elianderlohr/SemencesCertifiees/wiki