GithubHelp home page GithubHelp logo

cfreshman / personal-public Goto Github PK

View Code? Open in Web Editor NEW
2.0 1.0 0.0 893.76 MB

build web apps on freshman.dev. project board: https://github.com/users/cfreshman/projects/4

Home Page: https://freshman.dev/developer-program

JavaScript 33.83% Shell 0.22% HTML 24.26% TypeScript 41.56% CSS 0.14%

personal-public's Introduction

Dependencies

On your local computer and remote host

  • nodejs
  • yarn
  • mongodb

On your remote host (tested with Ubuntu 18+)

  • nginx (recommended)
  • certbot (recommended, for https)
  • pm2 (recommended)
  • screen (recommended)

Setup

Local Development

Run the following in the project directory:

npm install
npm run dev

Production Server

  • replace ~/dev/personal with the location on your computer
  • replace [email protected] with your username & domain for remote host (or raw IP)
  • replace /var/www/personal with the location on your remote host
  • replace personal with the name for your app in PM2
  • replace port=22 if you've set a custom SSH port on your remote
path='~/dev/personal'
remote_at='[email protected]'
remote_path='/var/www/personal'
pm2_name='personal'
port=22

pushd $path
yarn build

remote_full="$remote_at:$remote_path/"
scp -P $port *.* $remote_full
rsync -avz --rsh="ssh -p$port" build $remote_full --delete
rsync -avz --rsh="ssh -p$port" server $remote_full --delete
rsync -avz --rsh="ssh -p$port" deploy $remote_full --delete
ssh $remote 'cd $remote_path && yarn install'
ssh $remote "echo 'source $remote_path/deploy/bash_profile' >> ~/.bash_profile && source ~/.bash_profile && in2"
ssh $remote "screen -S test -dm bash -c 'mongod --dbpath=$remote_path/data'"
ssh $remote "pm2 start $remote_path/server/index.ts --name $pm2_name"
ssh $remote "nginx"
popd

You'll want to make sure the firewall allows traffic to the server: https://www.digitalocean.com/community/tutorials/how-to-secure-nginx-with-let-s-encrypt-on-ubuntu-20-04#step-3-allowing-https-through-the-firewall

Deploy

(replace same items as above)

path='~/dev/personal'
remote_at='[email protected]'
remote_path='/var/www/personal'
pm2_name='personal'
port=22

pushd $path
yarn build

remote_full="$remote_at:$remote_path/"
scp -P $port *.* $remote_full
rsync -avz --rsh="ssh -p$port" build $remote_full --delete
rsync -avz --rsh="ssh -p$port" server $remote_full --delete
rsync -avz --rsh="ssh -p$port" deploy $remote_full --delete
ssh $remote 'cd $remote_path && yarn install && pm2 reload $pm2_name'
ssh $remote "cd $remote_path && source ~/.bash_profile && in2"
popd

Pico-specific setup

Install git submodules in order to build Raspberry Pi Pico apps

cd server/routes/pico-repo/pico-sdk
git pull
git submodule update --init

cd ../pico-examples
mkdir build && cd build
cmake -DPICO_BOARD=pico_w ..

personal-public's People

Contributors

cfreshman avatar

Stargazers

Jorge Benjumea avatar  avatar

Watchers

 avatar

personal-public's Issues

READ THIS BEFORE DOING ANYTHING

in any case, reach out if u face any problems while setting up the repo on ur own development machine (or have any other questions): freshman.dev/contact
i develop on macOS, not sure how it works on anything else. if u don't have a Mac, i'd highly recommend getting a used MacBook Pro 13" off Facebook marketplace or similar to develop with

want to make a web app?
- develop solo and submit a pull request for me to approve
- in most cases, make under consistent <freshman.dev username>- prefix, like freshman.dev/cyrus-cool-app
- send me your full-time hours worked and venmo and you'll get next week's donation split (full disclosure - we're at $22/month in donations right now - freshman.dev/donoboard)

want to solve bugs? continue here with unclaimed GitHub Issues

want to report a bug or provide feedback? click "New issue" above!

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.