This is RESTful api design for
Zwallet App frontend
.
Built with Node js, using ExpressJs framework and other libraries.
- Open your terminal or command prompt
- Type
git clone https://github.com/solehudin5699/ZWALLET-backend.git
- Open the folder and type
npm install
for install dependencies - If you haven't installed nodemon, please install it globally, type
npm install -g nodemon
- Create database such as named zwallet_db and import database zwallet_db.sql in folder sql to your new database
- Create file .env in root folder with the following contents :
DB_HOST = 'localhost'
DB_USERNAME = 'root'
DB_DATABASE = 'name_database'
DB_PASSWORD = ''
PORT = 8000
PORT_SOCKET=8001
NODEMAILER_PORT=465
NODEMAILER_EMAIL_SERVICE='email_service'
NODEMAILER_EMAIL_USER='email_for_send_OTP'
NODEMAILER_EMAIL_PASSWORD='password_email_for_send_OTP'
SECRET_KEY='ZwAllEt'
Customize name_database
, email_service
, email_for_send_OTP
and
password_email_for_send_OTP
with the one you are using.
Example:
DB_HOST = 'localhost'
DB_USERNAME = 'root'
DB_DATABASE = 'zwallet_db'
DB_PASSWORD = ''
PORT = 8000
PORT_SOCKET=8001
NODEMAILER_PORT=465
NODEMAILER_EMAIL_SERVICE='gmail'
NODEMAILER_EMAIL_USER='yourname@gmail.com'
NODEMAILER_EMAIL_PASSWORD='my-email-password'
SECRET_KEY='ZwAllEt'
- Run XAMPP control panel
- Type
npm run server
ornpm start
in terminal for run this backend.
No. | Method | Endpoint |
---|---|---|
1 | POST | /auth/registration |
/auth/login | ||
/auth/validate | ||
/auth/reset | ||
2 | GET | /auth/user/:id |
3 | PATCH | /auth/update/:id |
No. | Method | Endpoint |
---|---|---|
1 | GET | /contact |
No. | Method | Endpoint |
---|---|---|
1 | POST | /transaction |
2 | GET | /transaction/:id |
Check out the documentation here for your convenience.
Frontend Zwallet App that use this RESTful API.