-
Notifications
You must be signed in to change notification settings - Fork 19
Setup a new Mac for Development
This guide will go through everything worth installing to start developing locally on a Mac for Flux Notes. It assumes that nothing is installed prior to reading this guide
We use Chrome as our primary browser for Flux Notes. Install from here
iTerm2 is cooler than the regular "Terminal" app that comes with Macs. Download it here
This is the text editor that we use for Flux Notes. It has useful extensions that make development a lot easier. You can install it directly from the website.
Homebrew is a package manager for Macs that can be used to install different things onto your machine from the terminal.
- Open up iTerm2
- Homebrew requires that the xcode command line tools be installed. Run the following command in the terminal:
xcode-select install
- Install by copying and pasting the installation command from this site into the terminal:
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
- Make sure everything worked by running the
doctor
command for homebrew in the terminal:
brew doctor
Git is what we use for version control in Flux Notes. Git might come pre-loaded on Macs, but the version could be out of date, so install Git with Homebrew in the terminal:
brew install git
Tell git who you are but using the git config
command in the terminal:
git config --global user.name "Your Name"
git config --global user.email "[email protected]"
Node.js is required to run the Flux Notes application in the browser. Our recommended version is v10.14.1 currently. We can install this using nvm
(Node Version Manager). It's useful to install it this way instead of through Homebrew so you can switch versions easily later if we need to.
- Paste the following install script from
nvm
into your terminal:
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.34.0/install.sh | bash
- Ensure that it was correctly installed with this command:
command -v nvm
- Install node using
nvm
:
nvm install 10.14.1
- Ensure that both node.js and npm (node package manager) were installed correctly:
node --version
npm --version
We use Yarn to control our packages in Flux Notes. It is essentially a wrapper of npm
that ensures the locking of package versions via a lockfile. It can be installed using Homebrew:
brew install yarn
Ensure that it was installed correctly by checking the version:
yarn --version
All of the code for Flux Notes is located on our GitHub Repository. If you don't already have a GitHub account, you can create one for free.
I recommend using an SSH key in GitHub. This will prevent you from having to enter your username and password in the terminal every time you try to read or write code on your local machine with respect to the remote Flux Notes repository
- In the terminal, run the following command:
ssh-keygen -t rsa
- It will prompt you for some information, including a passphrase and stuff. You can leave these things blank, so just keep hitting enter until the keypair is generated
- View the contents of the public key by running the following command in the terminal:
cat ~/.ssh/id_rsa.pub
This should print out something that looks like this:
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAA ... (more random letters and numbers) ...
- Copy all of this to your clipboard (including the ssh-rsa part)
- Ensure that you are logged in to GitHub in the browser using the account you just created
- In GitHub in the browser, click on the rightmost icon in the top right and select "Settings"
- From the menu on the left side, click on "SSH and GPG Keys"
- Cick the green "New SSH key" button
- Name it whatever you want, like "MITRE laptop" or something, and paste the contents of the public key that you copied from the terminal (the part that begins with "ssh-rsa") into the box under the word "Key"
- Click "Add SSH Key"
You should now have everything setup that you need to start developing on Flux Notes. To get the code up and running:
- Clone the repository in the terminal:
cd ~
mkdir Projects
cd Projects
git clone [email protected]:FluxNotes/flux.git
This should get the code on your machine
- Go into the newly created "flux" directory and install the dependencies:
cd flux
yarn install
This might take a minute or 2 to install everything
- Start the local server:
yarn start
Flux Notes should now be running in the browser. Go to http://localhost:3000/pilot1 and you should be able to view the app
Copyright © 2017 The MITRE Corporation | Approved for Public Release; Distribution Unlimited. Case Number 16‑1988
- Home
- About Flux Notes
- Active Treatment Summary Objects
- Data Standards for Breast Cancer
- Database decision
- Declarative Shortcut Format
- Demo Script
- Deployment Plan - Lite Mode
- Dragon Software Information and Troubleshooting
- Flux Notes Lite Demo Script
- How To Create New Shortcuts
- Interaction Between REACT.js Components in Flux
- JavaScript and HTML Code Style Guide
- Key Application Features
- Minimap Evaluation
- Naming Convention for Visual Components
- NLP Server: Provisioning and Troubleshooting
- Pre Release Testing Script
- Profiling and Performance
- Redux Implementation Guide
- Shorthand Context Problem
- Testing
- Third Party Libraries Changes
- Demo Scenarios -- (out of date)