Expense-tracker
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
- Install node.js by nvm
- download nvm-setup.zip from nvm-windows on github and then unzip it
- install LTS version of node.js
$ nvm install 10.16.0
- Download MySQL and workbench from official website and install
- Download this project
$ git clone https://github.com/umbrally/expense-tracker-sequelize.git
- Install packages used in this project
$ npm install
- Create database in MySQL
- Open MySQL workbench.
- Input below code in query tab and execute.
drop database if exists expense_tracker;
create database expense_tracker;
use expense_tracker;
- Create table and models by executing db:migrate
- Input below code in terminal
$ $ npx sequelize db:migrate
-
Create facebook login OAuth Facebook for Developers Create an new app and using facebook login, and then get applicaiton ID and application Secret.
-
Set .env and use it
-
Step 1. Create an .env file in root.
-
Step 2. Write env data as following.
FACEBOOK_ID=//your fackbook application ID from '5. Create facebook login OAuth' setting
FACEBOOK_SECRET=//your fackbook application Secret from '4. Create facebook login OAuth' setting
FACEBOOK_CALLBACK=http://localhost:3000/auth/facebook/callback
- http://localhost:3000 execution on your browser
$ npm run dev
- User can register by giving email and password. If the email is registered, user will be reminded.
- User can login by email/password or facebook. If email or password is incorrect, user will be reminded.
- If login is not successful, user will not visit any page and redirect to login page.
- After login is successful, an login session will created and save cookie in user's side. Then, user can use following function: ** Only the expense records created by the user will be showed. ** Create new record. ** Edit, delete function on main page. ** Copy the record to create a new one. ** Alert modal will show if delete button is clicked. ** User can filter records with month and category.
- User can logout and session will be deleted.