A totally functional user api. It's a service where you list users, create users, update or even delete them.

Overview

USER-API

🎯 ABOUT

A user api system made with TypeScript using express and prisma. It's a service where you list user, create users, update them or even delete them.

🚀 TECHNOLOGIES

  • NodeJS
  • Docker
  • PostgreSQL
  • Prisma
  • Express
  • TypeScript
  • Jest
  • Supertest

What I learned doing this project

  • Express - I'm already familiarized with this framework, and doing this project I've learned how to use the router feature .

  • PostgreSQL - With this project I also learned this incredible database, wich is one of the most used databases in the industry righ now.

  • Docker - I learned how to use Docker with the going of this project, it's an impressive tool, I'm sure it'll help in my career, since it's so popular in the industry at the moment.

  • Prisma - First time using this amazing ORM. It has a very simple usage but yet so powerful, with a few lines of code you can store and validate data like never.

  • Jest - It was doing this project that I learned how to make and manage tests on an application, it's quite simple once you get the flow of it, and a super-efficient tool for developers, it can save a lot of time.

  • Supertest- Also first time using this technology, It was used combined with jest as I

  • TypeScript - It has been a great experience using and learning typescript, it's simply amazing how it can optimize work.

  • Heroku - Last but not least, I've learned how to deploy an application on heroku, an amazing service.

🏁 How to test it

  • Run npm run test and it'll have all the endpoints tested

How to run it locally

  1. Run git clone and clone the repository

  2. Run npm install on the directory.

  3. Create in the root of your repository the file .env and set your database credentials as the example: DATABASE_URL="PostgresURL"

  4. Run npm run start on terminal

☑️ How to run it locally with Docker

  1. Get in the directory where it was cloned with cd /user-api
  2. Create the image running docker build -t api/user-api .
  3. Create a container running docker run -p 3000:5000 api/user-api
  4. Acess localhost:3000/ and now you can acess all the endpoints on localhost

📝 API Endpoints

GET /users -> Return a list of all users
GET /users/:id -> Return a specific user based on an id
POST /createuser -> Create a new user based on the body of the request as -> user, email and name
PUT /updateuser/:id -> Update a specific user based on an id and body of the request with new data as -> user, email and name
DELETE /products/:id -> Delete a specific user based on an id

🌌 Test API ONLINE

  • Since the api is deployed on heroku, you can test the endpoints on your browser with the following url
    https://user-api-postgres-prisma.herokuapp.com/
You might also like...

This is a Microverse (@microverseinc) project in which I created a To-do list using Webpack. User can add a task, delete it, edit its description, and clear the completed tasks.

Microverse To-Do list This is a Microverse (@microverseinc) project in which I created a To-do list using webpack. Requirements Build a Todo list usin

Aug 3, 2022

The website which can help you to organize your daily or weekly activities and review them when you need them. you can add, remove and delete an activity

To Do list To do project is webpack project that list activities someone can do at a specific time In this TO-DO list, you can add or remove you activ

Jul 21, 2022

A to-do list app is a productivity tool designed to help users to create and maintain lists of tasks that they need to complete and it allows user to edit their tasks even after the task is saved. Built with CSS, HTML, and JAVASCRIPT.

Tumaini Maganiko 📗 Table of Contents 📗 Table of Contents 📖 To Do List PROJECT 🛠 Built With Tech Stack Key Features 🚀 Live Demo 💻 Getting Started

May 9, 2023

To do list is a simple CRUD application that allows you to add, delete, update tasks that you are supposed to do. It is built with HTML, CSS and JavaScript

To do list is a simple CRUD application that allows you to add, delete, update tasks that you are supposed to do. It is built with HTML, CSS and JavaScript

to do List To do list is a simple CRUD application that allows you to add, delete, update tasks that you are supposed to do. Built With HTML-5 CSS3 Ja

Jun 7, 2022

To do list is a simple CRUD application that allows you to add, delete, update tasks that you are supposed to do.

To do list is a simple CRUD application that allows you to add, delete, update tasks that you are supposed to do.

to do List To do list is a simple CRUD application that allows you to add, delete, update tasks that you are supposed to do. Built With HTML-5 CSS3 Ja

Jun 23, 2022

Angular 14 Firebase CRUD with Realtime Database - AngularFireDatabase Object and List example: create, retrieve, update, delete

Angular 14 Firebase CRUD with Realtime Database - AngularFireDatabase Object and List example: create, retrieve, update, delete

Angular 14 Firebase CRUD example with Realtime DataBase | AngularFireDatabase Build Angular 14 CRUD example with Firebase Realtime Database that uses

Dec 26, 2022

In this project, I implement a Simple To Do List with the CRUD (create, read, update, delete) methods. I followed the JavaScript, CSS, HTML, DRY, KISS and YAGNI Best practices.

In this project, I implement a Simple To Do List with the CRUD (create, read, update, delete) methods. I followed the JavaScript, CSS, HTML, DRY, KISS and YAGNI Best practices.

To Do list: add & remove In this project, I implement a Simple To Do List with the CRUD (create, read, update, delete) methods. All the elements of th

Nov 20, 2022

This an CRUD app built were users can create, update and delete specific day to day tasks as they wish. The app is built using webpack and served with webpack dev server

This an CRUD app built were users can create, update and delete specific day to day tasks as they wish. The app is built using webpack and served with webpack dev server

Todo-List This an CRUD app built were users can create, update and delete specific day to day tasks as they wish. The app is built using webpack and s

Sep 28, 2022
Owner
Luiz Sanches
Hi, I'm Luiz, a back-end developer
Luiz Sanches
A product system made with NestJS. It's a service where you list products, create products or even delete them.

Products-API A product system made with NestJS. It's a service where you list products, create products or even delete them. What I used in this proje

Luiz Sanches 4 May 18, 2022
In this project, I implement a Simple To Do List with the CRUD (create, read, update, delete) methods. All the elements of the user interface are fully functional.

To Do list: add & remove In this project, I implement a Simple To Do List with the CRUD (create, read, update, delete) methods. All the elements of th

Olivier 10 Jan 3, 2023
A CRUD made with NodeJS. It's a book directory where you can see the books, add new ones, update them, or even delete .

BOOK-DIRECTORY-NODEJS A CRUD made with NodeJS. It's a book directory where you can see the books, add new ones, update them, or even delete . What I u

null 6 May 18, 2022
A CRUD made with NodeJS. It's a book directory where you can see the books, add new ones, update them, or even delete .

Book-Directory-NodeJS A CRUD made with NodeJS. It's a book directory where you can see the books, add new ones, update them, or even delete . What I u

null 5 May 13, 2022
This is a Webpack based to-do-list project. With this app, users can add thier daily routine tasks to the list, mark them as complet, edit them or delete them.

To Do List This is a Webpack based to-do-list project. With this app, users can add thier daily routine tasks to the list, mark them as complet, edit

Ali Aqa Atayee 12 Oct 30, 2022
This project is a list manager that will allow a user organize a list of their tasks. They can conveniently create, update and delete tasks.

TO DO LIST APP This project is a list manager that will allow a user organize a list of their tasks. They can conveniently create, update and delete t

Kehinde Onifade 8 Oct 7, 2022
A simple to do list webpage where you can log the daily tasks you have to do, mark them as checked, modify them, reorder them and remove them. Made using HTML, CSS and JavaScript.

To-Do-List This Webpage is for an app called To-Do-List which helps you add, remove or check tasks you have to do. It is a simple web page which conta

Zeeshan Haider 9 Mar 12, 2022
My terrible attempt at a promposal. Update: She said yes LMFAO Update Update: I got friendzoned right after 😭

TypeScript Next.js example This is a really simple project that shows the usage of Next.js with TypeScript. Deploy your own Deploy the example using V

John Li (Tet) 7 Oct 27, 2022
A web app which help you to save you a list of your favorite books, they will be saved on your local storage to never loose them even if you close the page. Built wiht JavaScript

Awesome Books In this project I build a page to save a list of your favorites books, you can add new books, delete it and they will be saved in the lo

Williams Colmenares 9 Dec 17, 2022