Skip to content

Instantly share code, notes, and snippets.

@AloofBuddha
Last active April 17, 2017 16:48
Show Gist options
  • Save AloofBuddha/72f16067329dbbb94d84fc8b6e8d2af3 to your computer and use it in GitHub Desktop.
Save AloofBuddha/72f16067329dbbb94d84fc8b6e8d2af3 to your computer and use it in GitHub Desktop.
Bones Setup Walkthrough

My own walkthrough of setting up Bones

Replace kaizerroll with your own username wherever you see it in the following examples!

Also, only one person on the team needs to create the Github repo (1-2). Everyone else can be added as a project member and clone it.

  1. Fork bones from https://github.com/FullstackAcademy/bones
  1. Rename your project (optional)
  1. Clone local copy
  • git clone https://github.com/kaizerroll/GraceShopper
  • Note: git clone https://github.com/kaizerroll/GraceShopper <optional-folder-name> also works
  • The name of the folder of your local repo doesn't actually matter, but the name of your project on Github does
  1. cd GraceShopper

  2. Set upstream (optional)

  • Setting an 'upstream' remote repo allows us to pull updates from the original bones project if necessary
  • git remote add upstream https://github.com/FullstackAcademy/bones
  • git remote -v should now show both origin and upstream
    • origin - the remote repo you forked to. You can pull and push changes to this repo as you own it!
    • upstream - the remote repo you forked from. You can only pull changes to this repo as you don't own it!
  • periodically you can merge any updates from upstream with git pull upstream master. You shouldn't need to do this but we will let you know if there are any bugfixes to bones that happen during your GraceShopper phase.
  1. Install dependencies
  • yarn (or npm install)
    • If you don't have yarn, get it with npm install -g yarn. I recommend it as it's faster and messes up less often for me. It's pretty straightforward to replace npm with yarn, and most commands are more straightforward with sensible default behavior (yarn add express vs npm install --save express).
    • Check https://yarnpkg.com/en/docs/cli/ to learn more.
  1. Update node (optional)
  • if you get a complaint that your node version is not up to date, we need to get a later version.
  • I use an npm module called n, which is a node version manager like nvm - this let's you switch between different versions of node when necessary without much fuss.
  • yarn global add n
  • n to check current version you are using
  • n latest to download and use latest version of node
  1. Run
  • npm run dev will start your app with the node environment variable NODE_ENV set to "development". This is a bit overkill for your needs, but it allows one to set up things like different logging or startup behavior depending on the NODE_ENV, which could be "production", "testing" etc.
  • Running the app should progressively tell you about things you need to do before it is 'ready'
  1. Name It
  • lower case and hyphenated project name in package.json like grace-shopper
  1. Create a DB
  • I use Postico but any means work. What you want is a database with a name that matches your project name (so mine is 'grace-shopper').
  • You can see that the url the Sequelize is looking for at db/index.js, i.e. postgres://localhost:5432/${name}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment