Coder Social home page Coder Social logo

project_3c_brayan_orozco's Introduction

Project_3c_Brayan_Orozco

INCODE Bootcamp - Connecting express with MySQL

๐Ÿšฉ Step 1 : Build your database

The schedule data will be stored in a database: MySQL. We call MySQL a relational database because the data is formatted according to a very precise schema, defined before adding any data.

Creating a database therefore starts by elaborating the data schema, i.e. what data will be stored and in what form.

This step is crucial because it determines the right logic for your application.

You need to create a MySQL database with Node.Js and connect to it before creating your table.

For this project, you need a 'schedule' table.

Your 'schedule' table will be composed of the following fields:

  • a unique key (ID),

  • a username,

  • the day of the week (1 for Monday, 2 for Tuesday... 7 for Sunday),

  • a start time

  • and an end time (both TIME type).

๐Ÿšฉ Step 2 : Build the two routes

Create a route "/" that will retrieve the list of existing schedules from the database and display them.

Create a route "/new" which will implement two actions:

  • on GET, a form to add a schedule will be displayed.

  • on POST, the form data will be saved in the database. You will then redirect to the form.

๐Ÿšฉ Step 3 : Create the corresponding views

You need to implement two views:

  • the view that displays all schedules, which will simply be presented as < USER NAME - day start_time - end_time > For example: < MAUD - Tuesday 8:30-12:30 >

  • the view that displays the form.

On each of your views, there will be a link to the other view.

project_3c_brayan_orozco's People

Contributors

brayanorozco 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.