NB: BACKEND FOR MALAIKA CROWD-FUNDING does not include frontend files, so you have to communicate with it through the API.
I suggest three ways to interact with the API:
-
Ideally through a frontend, for a production-ready environment.
-
I provided four python testers for you to test the API in case you don't have a frontend. You can find these files in the "python-tester" folder. NB: Just run (for a file filename.py):
python filename.py
(Windows) or
python3 filename.py
(Linux/MacOs) and follow along with the test prompts.
- You can use a tool like Visual Studio Code's "REST Client" extension. NB: Before you do any of these, you should first build the backend
first, run:
cd malaika-backend
NB: you can change "malaika-backend" to whatever name of the folder that contains this README.md
npm install
npm run tsc
npm run server
npm run start
Finally, navigate to http://localhost:5000/ and you should see the API running! NB: You should make requests to the API running in port http://localhost:5000/.
Read the contents of the API-DIRECTIONS folder for guides on making API requests.
NB: Also, you need to have a running instance of mongodb either locally or online. If you are in a dev environment, you can easily achieve this by installing mongodb for your system and running it.
In a production environment however, you might need to connect to an online instance.
PS:
-
Note that whatever database name you are using should replace the default "Projects" database I used in this url: "mongoURI": "mongodb://localhost:27017/Projects", Check the "config/default.json".
-
Kudos to the owner of https://github.com/sunnysidelabs/mongoose-express-ts, which I used as boilerplate for this project.