This is a REST API for fokontany, kaomina, distrika, faritra and faritany in Madagasikara made with Node.js and MySQL.
- Download madagasikara.sql and import it on your MySQL/MariaDB server.
- Go on prisma folder and copy/paste
.env.example
file into.env
. - Edit the
.env
file with a valid credentials in order to connect to the database. - Run the following commands :
npm i
npx prisma db pull
npx prisma generate
npm start
- Go to http://localhost:8800
/v1/{fokontany or kaomina or distrika or faritra or faritany}
: List of fokontany or kaomina or distrika or faritra or faritany./v1/{fokontany or kaomina or distrika or faritra or faritany}/:id
: Fokontany or kaomina or distrika or faritra or faritany with specified id./v1/{fokontany or kaomina or distrika or faritra or faritany}/name/:name
: List of fokontany or kaomina or distrika or faritra or faritany with specified name.
/v1/{fokontany or kaomina or distrika or faritra or faritany}/add
: Add fokontany or kaomina or distrika or faritra or faritany.
/v1/{fokontany or kaomina or distrika or faritra or faritany}/edit/:id
: Edit fokontany or kaomina or distrika or faritra or faritany with specified id.
/v1/{fokontany or kaomina or distrika or faritra or faritany}/delete/:id
: Delete fokontany or kaomina or distrika or faritra or faritany with specified id.
- There is no authentication or permission system on this API.
- Logs are visible on
prod.log
anduncaughtExceptions.log
files.
Follow this guide.