Giter Site home page Giter Site logo

learning-prisma-orm's Introduction

Learning Prisma ORM

I'm learning Prisma ORM, so to train I created this rest API that I had seen in this video by Full-Cycle

Technologies

Here are the technologies used in this project.

  • Node.js
  • TypeScript
  • Express.js
  • Prisma
  • PostgreSQL
  • ts-node-dev

Services Used

  • Github

Getting started

  • Clone the repository
  git clone https://github.com/Artur-Poffo/Learning-Prisma-ORM.git
  • Install PostgreSQL in your machine

    • Follow the steps in the documentation for your operating system and install
  • Connect your database to the application

    • Create a .env file on root directory
    • insert one environment variable:
        DATABASE_URL="postgresql://<YOUR USER>:<YOUR PASSWORD>@localhost:5432/postgres?schema=public"
    • That's it, in the Prisma schema it calls this environment variable to connect the DB, just replace it with your PostgreSQL user information
  • install dependencies.

    • npm install on root directory (you need installed node and npm for this)
    • Run on root directory: npx prisma migrate dev
  • To run the project.

    • npm run dev on root directory

How to use

Obs: you will need a program to test the Endpoints, like Insomnia but i recommended the Thunder Client VScode extension

Routes and Features

  • /

    • GET
      • Show a Welcome! message
  • /students

    • POST
      • Adds a new Student to DB
  • /trails

    • POST
      • Adds a new Trail to DB
  • /courses

    • POST
      • Adds a new Course to DB
  • /lessons

    • POST
      • Adds a new lesson to DB
  • /enrollments

    • POST
      • Adds a new enrollment to DB

Links

Versioning

1.0.0

Authors

Artur Poffo

Please follow github and join us! Thanks to visiting me and good coding!

learning-prisma-orm's People

Contributors

artur-poffo avatar

Stargazers

 avatar

Watchers

 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.