GithubHelp home page GithubHelp logo

jean-t86 / djamware-node-tutorial Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 33 KB

This repository contains the code for the completed djamware tutorial on using the Sequelize ORM package in an Express application.

JavaScript 98.68% CSS 0.35% HTML 0.97%

djamware-node-tutorial's Introduction

Djamware Node.js, PostgreSQL & Sequelize Tutorial

Table of contents

General Information

This repository contains the code for the completed djamware tutorial on using the Sequelize ORM package in an Express application. Under the hood, the ORM uses PostgreSQL as database for this example.

Technologies

  • JavaScript
  • Node.js
  • Express.js
  • PostgreSQL
  • Sequelize ORM

Setup

In order to run the program, you need to install Node.js on your computer:

Once installed, install the program's dependencies with npm install in your terminal with the project's folder as working directory.

You can then start the Express server by typing npm start.

Database schema

  • Classroom:
    • id: number
    • class_name: string
  • Student
    • id: number
    • classroom_id: number
    • student_name: string
  • Lecturer
    • id: number
    • lecturer_name: string
  • Course
    • id: number
    • lecturer_id: number
    • course_name: string

Endpoints

Once you have the server up and running, the following end points will be reachable in http://localhost:4001/:

Classroom

GET

  • /api/classroom
  • /api/classroom/:id

POST

  • /api/classroom
  • /api/classroom/add_with_students

PUT

  • /api/classroom/:id

DELETE

  • /api/classroom/:id

Student

GET

  • /api/student
  • /api/student/:id

POST

  • /api/student
  • /api/student/add_course

PUT

  • /api/student/:id

DELETE

  • /api/student/:id

Lecturer

GET

  • /api/lecturer
  • /api/lecturer/:id

POST

  • /api/lecturer
  • /api/lecturer/add_with_course

PUT

  • /api/lecturer/:id

DELETE

  • /api/lecturer/:id

Course

GET

  • /api/course
  • /api/course/:id

POST

  • /api/course

PUT

  • /api/course/:id

DELETE

  • /api/course/:id

djamware-node-tutorial's People

Contributors

jean-t86 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.