Skip to main content
Advanced Search
Search Terms
Content Type

Exact Matches
Tag Searches
Date Options
Updated after
Updated before
Created after
Created before

Search Results

7 total results found

CSC105 Backend 27/4/23

CSC105 Backend fundamental

1. What is the Backend? Backend development (often called the “server-side” development), is the creation of everything that goes on behind the scenes of a website or application that the user can’t see. The backend normally consists of an application, server ...

Database connection

Week2 : Database connection

1. Let's start by creating an index.js then initializing your JavaScript project by running npm init in your terminal after that let's download the libraries that we will be using today which are express and mysql by running npm install express mysql2 dotenv...

Example of Read

Week2 : Database connection

Let's write the endpoint that query user balance data from the database and response to the user. This the schema of sample database 👇🏻 1. Let's create a first endpoint query balance from the database by create getBalance.js in controller->transactio...

Example of Create

Week2 : Database connection

1. Let's create an endpoint to create new user into the database, create create.js into directory controllers->users 2.  Write down using this code const connection = require("../../services/database"); const create = async (req, res) => { // Get data f...

Example of Update

Week2 : Database connection

Let's create an endpoint to update user balance into the database, create updateBalance.js into directory controllers->transactions 2.  Write down using this code const connection = require("../../services/database"); const updateBalance = async (re...

Example of Delete

Week2 : Database connection

Let's create an endpoint to delete user from the database, create deleteUser.js into directory controllers->users 2.  Write down using this code const connection = require("../../services/database"); const deleteUser = async (req, res) => { const ...

Assignment : Integration with frontend

Week2 : Database connection

1. Download the frontend from this link https://drive.google.com/file/d/1UuALet56_czOseatkx2-jCsgUwWiYFAO/view?usp=sharingthen run npm i when you run it should look like this then npm i axios 2.  Then go to your backend run npm i cors then add the code bel...