8000 GitHub - Fuji-Noobie-Ghost/e-fanakalo: TechZara WCC Dev 2
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Fuji-Noobie-Ghost/e-fanakalo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

E-fanakalo

#techzara_wcc2

All things you need to do

  • Start your PostgreSQL service and create a new database

    CREATE DATABASE <your_database_name>;
  • Edit .env files in your project root according to your environment

  • In your terminal, run the following command

    npm install
    npm run migration:run # Create all Tables
  • Create a directory 'uploads' in the project root

    mkdir uploads
  • Finally, you can run the API with the following command

     npm start

This are a list of request you can test

Method URI Description
GET / action: return all exchanges
pagination: without pagination system
accept query: status(active or deactive)
GET /exchanges action: return all exchanges
pagination: with pagination
accept query: page(number), per_page(number), status(active or deactive), sort(username or title or createdAt or updatedAt)
default value: page=1, per_page=10, sort=updatedAt
POST / action: create a new exchange
payload: username(string), contact(string), title(string), searchFor(text as string), photos(list of images)
return: the current data pass to the database
PUT /activate action: set an exchange to active mode
query params needed: the exchanges id(string)
PUT /deactivate action: set an exchange to deactive mode
query params needed: the exchanges id(string)

Have a nice Day :)

About

TechZara WCC Dev 2

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
0