Logo Lanfrica

sauti-databank/back-end

Type de record:

software
Créateur:
sau
Hôte:
The backend for data-visualization portal for Sauti - a non-profit in Africa # API Documentation #### Backend deployed on Heroku. ## Getting started To get the server running locally: - Clone this repo, then, cd into the repo in Terminal and: - **yarn install** to install all required dependencies. - **yarn server** to start the local server. - **yarn test** to start server using testing environment. - **update .env** store SQL server connection info there. ### Backend framework We built our backend, including our REST API, using Node, Express, and Knex to work with a MySQL database. - REST API: We decided a REST API, one that responds only with JSON data upon a user request, would give us enough flexibility to present our data however we deem fit. - Node: We all learned Node.js, and since we were taking on a lot of new libraries in this project, learning MySQL, Nivo, and more, we decided Node.js would meet our needs for building our API and free us up to learn new tools. We also see potential for realtime data updating in the future, and know Node is particularly useful in those applications. - Express: We added a bit more usability to Node for our project using Express, a web application framework that lets us build a bit more rapidly. - Knex: We used Knex to help us more efficiently build our queries. - MySQL: Sauti has a lot of data to work with: over 5k users and 40k sessions. In order to best meet their needs and visualize their data, we used their existing and preferred MySQL database to eliminate migration issues and complexity. ## Endpoints ### User Routes | Method | Endpoint | Access Control | Description | | ------ | ------------ | -------------- | ---------------------------------------------------- | | GET | `/users/all` | public | Returns a list of all recorded Sauti Databank users. | #### Accessing gender data | Method | Endpoint | Access Control | Description …

Licenses