Coder Social home page Coder Social logo

dandirizkyy / w14-my-authorized-api-dandirizkyy-part2 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from revou-fsse-1/w14-my-authorized-api-dandirizkyy

0.0 0.0 0.0 188 KB

w14-my-authorized-api-DandiRizkyy created by GitHub Classroom

Home Page: https://w14-security-dandirizky.onrender.com

JavaScript 3.81% TypeScript 96.19%

w14-my-authorized-api-dandirizkyy-part2's Introduction

Review Assignment Due Date

Week 14 Dandi Rizky (Authentication and Authorization)


For this week assignment, i'm trying to make an authentication/authorization using session token on RESTAPI that i've been created on week 13 so only users that already registered can access the resource endpoint.

Installation πŸ”¨


In order to run this project locally, you need to clone this repository first using git clone

$ https://github.com/revou-fsse-1/w14-my-authorized-api-DandiRizkyy.git

then run pnpm install in your terminal to download all dependencies

$ pnpm install

create docker-compose.yaml on root folder (where the package.json installed) and fill with these commands to install postgresql database locally on your computer

version: "3"
services:
  postgres:
    image: postgres:14
    ports:
    - 5432:5432
    environment:
    - POSTGRES_DB=revou
    - POSTGRES_USER=revou
    - POSTGRES_PASSWORD=password
    volumes:
    - ./postgres-data:/var/lib/postgresql/data
  pgadmin:
    image: dpage/pgadmin4
    environment:
      - [email protected]
      - PGADMIN_DEFAULT_PASSWORD=password
    ports:
      - 15432:80

don't forget to create .env files on root folder same like before with these command:

DATABASE_URL="postgresql://revou:password@localhost:5432/revou?schema=public"

and run docker with these command:

docker-compose up -d

after that you can start the server using these following command :

# development
$ pnpm run start

# watch mode
$ pnpm run start:dev

# production mode
$ pnpm run start:prod

if you want to stop docker, you can use these command

docker-compose stop

Documentation πŸ“·



Postman Documentation

You can follow my documentation on postman: Link


Endpoint Documentation

  1. First of all, all you need to do is registering your email and password first using the following links
  1. After that, you can login with email and password that you registered before
  1. After you successfully login, you can access the resources endpoint such as users and products.
  1. Anddd for the last step.. dont forget to logout :)

Technologies πŸ’»


  • NestJS
  • Typescript
  • PrismaORM
  • PostgreSQL
  • Docker
  • Postman

Support πŸ™Œ


Nest is an MIT-licensed open source project. It can grow thanks to the sponsors and support by the amazing backers. If you'd like to join them, please read more here.

Stay in touch

License

Nest is MIT licensed.

w14-my-authorized-api-dandirizkyy-part2's People

Contributors

dandirizkyy avatar github-classroom[bot] avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.