This app allows visitors to search for programming languages tutorials, also adding tutorials links they think it usful by having an acoount on the site.
- As a user I want to create account.
- As a user I want to login to my account.
- As a user I want to logout from my account.
- As a user I want to add tutorial link to a specific language.
- As a guest/user I want to search for tutorials for specific language.
Website Link:Tutorials
- public
- style.css
- img
- src
- server.js
- app.js
- controllers
- home.js
- search.js
- errors.js
- signup.js
- login.js
- add.js
- views
- layouts
- main.hbs
- partials
- header.hbs
- footer.hbs
- home.hbs
- signup.hbs
- login.hbs
- errors.hbs
- profile.hbs
- search.hbs
- layouts
- database
- db_build.sql
- db_build.js
- db_connection.s
- queries
- getData.js
- postData.js
- user.js
- tests
- test.js
- .gitignore
- package.json
1- Clone this repo (https://github.com/FACK1/fid-sh-had-week8)
2- Open your command line.
3- Put in terminal : npm install.
4- Then create database in terminal CREATE DATABASE testapp ;
.
5- Then create user CREATE USER had with password 'none';
.
6- Then put command GRANT ALL PRIVILEGES ON DATABASE testapp to had;
will grant our had with all priviliges and rights to use and access the database.
7- Go the root directory and create a file "config.env", and put in it DATABASE_URL=postgres://had:none@localhost:5432/testapp
and SECRET=skjdahshadhaldakhdalkdad
.
8- Then put in terminal : node src/database/db_build.js to build the database.
9- Then put in terminal : npm run dev to run the server.
10- Open your browser and put in terminal: localhost:3001.