Skip to content
tawfeeqmPublic

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Repository files navigation

Node Express Assets Backend

Setup

  1. Clone your repository:
    git clone https://github.com/tawfeeqm/demclp.git
    cd demclp
  2. Ensure you have Node, npm, and Docker installed.
  3. Copy .env.sample to .env.
  4. Start the database using: docker-compose up -d.
  5. Run npm i
  6. Initialize the schema with: npm run init-schema.

Run

Execute npm run dev.

API Endpoints

User Authentication

Signup:

Method: POST

Endpoint: /users/signup

Payload:

{
    "email": "lynn@email.com",
    "username": "lynn",
    "password": "hello123"
}

Login:

Method: POST

Endpoint: /users/login

Payload:

{
    "email": "lynn@email.com",
    "password": "hello123"
}

Assets

Create Asset:

Method: POST

Endpoint: /assets/:userId

Payload:

{
    "title": "my pic",
    "url": "https://pic.website/1",
    "description": "just my pic",
    "type": "picture"
}

Get Asset by ID:

Method: GET

Endpoint: /assets/:assetId

Response:

{
    "response": {
        "type": "picture",
        "title": "my pic",
        "url": "https://tawfeeq.live",
        "description": "just my pic"
    }
}

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages