GithubHelp home page GithubHelp logo

nathanhynes / bonniedotdev Goto Github PK

View Code? Open in Web Editor NEW

This project forked from bonnie/bonniedotdev

0.0 0.0 0.0 29.59 MB

code for the https://bonnie.dev website

Home Page: https://bonnie.dev

Shell 1.23% JavaScript 2.43% Python 33.93% TypeScript 61.60% CSS 0.41% HTML 0.40%

bonniedotdev's Introduction

bonniedotdev

Code for https://bonnie.dev

License

GNU AFFERO GENERAL PUBLIC LICENSE

Installation for Development

Environment variables

  • $ cp dotenv_template .env
  • Fill out your environment variables
    • for development, the value of FLASK_ENV should be development

Client

  • $ cd client
  • $ npm install
  • $ npm run dev:build

Server

  • $ pip install pre-commit # if you don't have it installed globally
  • $ cd server
  • Create and activate a virtual env
  • $ pip install -r requirements.txt
  • $ pre-commit install

Building the Client for Production

After changes, you can re-build the client with:

  • $ cd client
  • $ npm run build
  • postbuild.sh will run automatically to move files to the correct place in app

Start up

  • $ cd server

  • $ source .env && python server.py

  • Note: You will need to re-run npm run dev:build upon changes to client

Testing

Client

  • $ cd client
  • $ npm test

Server

  • $ cd server
  • $ source .env
  • $ chmod +x ./run_tests.sh (make the file executable)
  • $ ./run_tests.sh

Deploying

Deploying client

  1. Build the client
  • $ cd client
  • $ npm run build
  • postbuild.sh will run automatically to move files to the correct place in app
  1. Upload the build
  • $ bash server/scripts/upload_build.sh
  1. log on to aws lightsail and run post-upload script
  • locally: bdd-ssh
  • on lightsail: ~/bonniedotdev/server/scripts/bdd-postupload.sh

Deploying server

  1. log on to lightsail
  • locally: bdd-ssh
  1. Pull from GitHub
  • on lightsail: git pull origin main
  1. Update db if applicable
  • on lightsail: ~/bonniedotdev/server/scripts/update_db.sh
  1. Restart server
  • on lightsail: ~/bonniedotdev/server/scripts/restart_server.sh

bonniedotdev's People

Contributors

bonnie 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.