- Node.js
- express
- body-parser
- pug
- mysql
- node-env-file
- express-session
- mySql
- css
- Add notes
- Delete notes
- Edit notes
Install Dependecies:
npm i mysql express express-session body-parser pug morgan node-env-file
Create the database:
CREATE DATABASE notes;
USE notes;
Create and modify the table
CREATE TABLE nts(
id INT(11) NOT NULL AUTO_INCREMENT,
title VARCHAR(18) NOT NULL,
content TEXT NOT NULL,
upload_date TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (id)
);
Environment Variables on the .env file required
MYSQL_HOST
MYSQL_USER
MYSQL_PASSWORD
Start it up the app:
npm run start