Code Monkey home page Code Monkey logo

bench's Introduction

Bench

Bench item tracker (Vue, Node, Docker, MySql).

Requirements

  • Node.js, NPM/Yarn
  • Docker Desktop
  • VSCode (optional)

Install Dependencies

Run npm install in both the root and client/ folders.

Create ENV File

In the root of the project, create a .env file with the following contents.

NODE_ENV=development
JWT_SECRET=localsecret
DB_USER=root
DB_PASS=password
DB_NAME=my_database

Create Database Instance

Create a local MySql instance with Docker.

npm run db:up

This command will use the docker-compose.local.yml file in data folder to create a running database on localhost:3306 and storing local data in data/mysql-data.

Init Database (Local)

Create the database to use.

npm run db:init

This command will run the data/init.js file to create a new database with the name my_database.

Migrate to Current Schema

Update the my_database schema according to the files in the migrations/ folder.

npm run db:migrate

This command will create all database tables, columns, and constraints.

Start Application (Dev)

In two separate terminals, run both commands below.

npm run server:dev

and,

npm run client:dev

You can now open the client on localhost:8080 and the server on localhost:5000.

Build and Run

Locally run the full stack with Express serving a Vue production build.

npm run start-local

bench's People

Contributors

batesdotgov avatar briantbates avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.