Code Monkey home page Code Monkey logo

nice-bytes's Introduction

nice-bytes

A clone of the popular website GoodReads where users can find and rate restaurants.

Local Environment Setup

The following are instructions for setting the project up to run locally on Windows WSL2.

Installing Dependencies

  1. Install Windows WSL2
  2. Install Postgres for Windows and confirm access to Postgres in WSL2 Ubunutu using psql -h localhost -U postgres postgres in bash
  3. Install Node and npm for WSL2 Ubuntu
  4. npm i -g sequelize-cli dotenv-cli on Ubuntu to globally install environment and migration toolsets

Clone Codebase

  1. git clone https://github.com/BenBolthouse/nice-bytes.git to clone this repo to a new directory "nice-bytes"
  2. cd nice-bytes to navigate to the project root
  3. git checkout development to setup a tracking branch for remote "origin/development"
  4. git checkout development-mvp-0 to setup a tracking branch for the first MVP feature branch

IMPORTANT: Do NOT do any development work in main branch!! Do NOT push changes to main! Always do your work in a branch off of development, such as development-mvp-###.

NOTE: If you would like to do experimental work on a branch off of a development branch, do git checkout -b local-[branch_name]. You can merge your changes into an MVP from a local, but be careful not to push a local branch up to origin. Locals will be discarded in the remote repository.

NPM and Database Setup

  1. npm i in project root to install node_modules
  2. Create a new database user "nicebytes_app" with a password of your choosing; grant CREATEDB to "nicebytes_app"
  3. Copy ./.env.example to ./.env and update with your Postgres user information
  4. npx dotenv sequelize db:create in project root to create the database with the Postgres user
  5. npm run dev to check to see if the Postgres connection is successful; should show "running on port... [port]" in your Ubuntu bash

At this point you should be able to use code . in bash in the project root to open VS Code.

VS Code Debugger for Nodemon

Our skeleton project has an NPM script npm start:development for the development server. However, if you'd like a breakpoint debugger for the project (highly recommend!!) then follow these steps:

  1. In the project root create a file ./.vscode/launch.json; you may need to create the directory
  2. In launch.json copy and paste the following launch configuration;
{
  "version": "0.2.0",
  "configurations": [
    {
      "console": "integratedTerminal",
      "internalConsoleOptions": "neverOpen",
      "name": "Nodemon",
      "program": "${workspaceFolder}/bin/www",
      "request": "launch",
      "restart": true,
      "runtimeExecutable": "nodemon",
      "runtimeArgs": ["-r", "dotenv/config"],
      "skipFiles": ["<node_internals>/**"],
      "type": "pwa-node"
    }
  ]
}
  1. Confirm that the debugger works by selecting a breakpoint in the application and then run the debugger "Nodemon"; the application should pause at the breakpoint

MVP Branching Strategy

All work will be done in the current MVP development branch. Current MVP at the time of writing this is MVP-0, so the branch we'll be pushing to is development-mvp-0. We'll do pull requests into main when we move on to new MVP versions.

nice-bytes's People

Contributors

benbolthouse avatar r-maloney avatar austin-from-tx avatar threedtx avatar jm-riley avatar idbentley 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.