Coder Social home page Coder Social logo

programming-courses's Introduction

user Journey

  • as a user I will be able to see programming courses
  • as a user I should be able to see courses details
  • as a user I should be able to add courses

file structure

- public
  - styleCourse.css
  - style.css

- src
  - database
    - queries
      - getData.js
      - postData.js
      - getDataId.js

    - db_build.sql
    - db_build.js
    - db_connection.js

  - handlers
    - home.js
    - getCourse.js
    - addCourse.js
    - error.js
    - index.js

  - views
    - layouts
      - main.hbs
    - partials
      - header.hbs
    - helpers
      - index.js
      - linkcourse.js
    - home.hbs
    - course.hbs
    - serverError.hbs
    - notFound.hbs

  - app.js
  - server.js

endpoints

GET ' / '
- Get data (about the courses) from the database and send it to the front-end by render

GET '/course/[id]'
- get id of coures by req.params and get data from database depend on [id]
- send data to the front-end by render

POST /addcourse
- add course details
- insert data into database

Database schema

Untitled-Diagram-5

Instructions :

To use our Repo without heroku database,you should:

  • git clone this repo
  • Put in terminal : npm install .
  • create database CREATE DATABASE (dbName); ;
  • create uesrname and password CREATE USER (userName) with password (password); ;
  • grant prinileges GRANT ALL PRIVILEGES ON DATABASE (dbName) TO (userName); ;
  • make config.env file and put DATABASE_URL= postgres://uesrname:password@localhost:5432/dbname
  • Put in terminal : node database/db_build.js.
  • Then put in terminal : npm run dev to run the server.

Team members

programming-courses's People

Contributors

duaah avatar ghassanmas avatar randinaim avatar sara219 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.