Skip to content

bensonybs/spendlit-api

Repository files navigation

SpendLit API

Backend API of SpendLit app.
Using Node.js & Express.js as backend server
Passport.js for user authentication
MySQL as database, Swagger for API document
Deploy on GCP

Try the APIs

Features

  • User: register, login, profile edition.
  • Account: manage personal account for record.
  • Record: add expense and income record.

Run the APIs as local server

Prerequisites

  • [email protected], MySQL and MySQL Workbench(optional)
  • Git
  • Code edittor like VS Code (optional)

Install and run

  • Open your terminal cmd, PowerShell, etc.
  • Clone from GitHub
    git clone https://github.com/bensonybs/spendlitAPI.git
    
  • Switch to the directory
    cd spendlitAPI
    
  • Install dependencies
    npm install
    
  • Create .env file and set environment variables
    Check .env.example for more details.
  • Create new database on MySQL Use MySQL Workbench or other tools to connect the database. Run the SQL command in below:
    CREATE DATABASE spendlit;
    
  • Set database arguments Modify config.json with your own MySQL username and password
    "development": {
        "username": "<your username>",
        "password": "<your password>",
        "database": "ac_twitter_workspace",
        "host": "127.0.0.1",
        "dialect": "mysql"
    }
    
  • Build table and seed data
    Run the command in terminal:
    npx sequelize db:migrate
    npx sequelize db:seed:all
    
  • Run the server
    npm run start
    
  • Check the API server on http://localhost:3000

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published