Notes to self on how to set up a developer space for myself in MacOS.
This is for setting up a fullstack dev environment for NodeJS, Mongo, and MySQL. Python coming soon!
Applications are deployed to Heroku.
- Open Terminal
- Enter the
git
command - Prompt will appear to install git
- If not, refer to https://git-scm.com/.
- Set up your github credentials using:
git config --global user.name "Your Name && git config --global user.email "you@example.com"
- Run
chflags nohidden ~/Library/
in Terminal
- Open Terminal
- Check for any existing SSH keys with
ls -la ~/.ssh
- If you get a
No such file or directory
then proceed to step 3, otherwise skip ahead to step 4. - Create a new SSH key using
ssh-keygen -t rsa -b 4096 -C "<YOUR EMAIL ADDRESS TIED TO GITHUB>"
- Ensure the SSH agent is enabled using
eval "$(ssh-agent -s)"
- Add your SSH key using
ssh-add ~/.ssh/id_rsa
- Now link the SSH key to github at https://github.com/settings/keys.
- In terminal use
pbcopy < ~/.ssh/id_rsa.pub
to get your public key - Paste that into Github using the link from step 6.
- Open Terminal
- Navigate to https://nodejs.org/en
- Click to download the latest stable (LTS version) of NodeJS
- After installation, run
node
in Terminal to test if it worked - Press
Ctrl C
to exit
These are some npm packages I use globally via sudo npm install -g
- chai
- firebase-tools
- karma-cli
- mocha
- mysql
- node-debug
- nodemon
- sequelize-cli
- webpack
As an aside, you can view your global packages using npm list -g --depth 0
- Open Terminal
- Navigate to http://brew.sh.
- Copy the command on their website into Terminal and run it
- Press the Enter key to confirm the download to the default folder
- Enter the
brew
command after the download to confirm it worked
Note that Python 2 is usually installed in Mac OS out of the box
- Open Terminal
- Check for Python version by typing
python
If you have Python 2, and want to keep it that way that's cool
- Note that you may also want to intall the pip package manager for Python 2 using
sudo easy_install pip
- You can test if it installed and get the version with
pip -V
If you want Python 3, then you can install that and pip3 in one shot
- Assuming Homebrew is installed, enter
brew install python3
to get Python 3 - You can test if Python 3 installed and get the version with
python3 -V
- You can test if pip installed and get the version with
pip3 -V
You can also use Canopy instead of Anaconda. But I picked Anaconda so I can pick either Python 2 or 3.
Note! If you did all the installations I mentioned in this repo, then you will have 3 Python versions on your Mac. One shy of this guy. This shouldn't be an issue but it's good to be aware of it. I plan on using the Mac and Homebrew verisons for web development and the Anaconda version for Data Science.
Anyway, install Anaconda by doing the following:
- On the Anaconda website choose either the Python 2 or Python 3 version.
- I picked the Graphical Installer (green button) for Python 3.6.
- Follow along with the installer's instructions.
- Type
conda
in your command line to ensure the download was successful. - You can look into this GitHub Repo to mess with the Pandas library in Python.
Note that Jupyter should come with Anaconda. If not, use their instructions to download it. Using pip
or pip3
is the easiest download. Type jupyter
in the command line to see if it was installed.
- Open Terminal
- Use Homebrew to install MySQL using
sudo brew install mysql
command in Terminal - Run the MySQL server after the installation is complete by entering
mysql.server start
in Terminal - Test if the server is working by entering
mysql -u root
- Type
\q
in Terminal to exit the MySQL CLI
- Navigate to http://dev.mysql.com/downloads/workbench
- Click to download MySQL Workbench
- After installation, open the Workbench and click "New Connection" to make a Localhost connection
- Open Terminal
- Use Homebrew to install MongoDB using
sudo brew install mongodb
command in Terminal - Configure the MongoDB environment using
sudo mkdir -p /data/db/
- Get read/write permission using
sudo chown -R $USER /data/db
- Test to see if Mongo is working using
mongod
in Terminal
- Navigate to https://robomongo.org/download
- Click to download RoboMongo
- After installation, open RoboMongo and click "New Connection" to make a Localhost connection
- Navigate to https://www.sublimetext.com/3
- Click to download (no purchase needed)
- Install the brogrammer syntax highlighting package. In the menu bar click Sublime Text > Preferences > Package Control > Install Package
- Also install HandlebarsJS and Babel syntax highlighting using the package installer from Step 4
- Add the
subl
command to your path using the directions in this repo. - Set up other preferences. In the Menu Bar, click Sublime Text > Preferences > Settings. Then, adjust the following properties:
{
"color_scheme": "Packages/Theme - Brogrammer/brogrammer.tmTheme",
"font_size": 10,
"ignored_packages":
[
"Vintage"
],
"scroll_past_end": true,
"tab_size": 2,
"translate_tabs_to_spaces": true
}
- Navigate to https://atom.io/
- Click to download (it's free)
- Customization to be continued.
- Navigate to Heroku to review their docs for setting up with NodeJS.
- Click to install the Heroku CLI for OSX.
- After installation, run
heroku login
in Terminal. - Finally, enter your Heroku account information and boom. Ready.
- Refer to their
Prepare the app
andDeploy the app
docs for deployment.
- Navigate to https://www.meteor.com/install
- Use the
curl
command in Terminal from their website.
- Navigate to https://developer.android.com/studio/install.html
- Click to install
- Refer to the React Native Docs to set up Andriod to work with React Native.
- Set the environmental variable in Terminal by typing
nano ~/.bash_profile
and then pasting in...
export ANDROID_HOME=~/Library/Android/sdk
export PATH=${PATH}:${ANDROID_HOME}/tools
export PATH=${PATH}:${ANDROID_HOME}/platform-tools
-
Then, save your changes by typing
ctrl+o
. Hitreturn
to save. Then exit Nano by typingctrl+x
. -
Activate your changes in Terminal with
source .bash_profile
. Refer to this, this, and this for more info. -
Fire up the Andriod Emulator with
andriod avd
in Terminal.
- Navigate to https://www.android.com/filetransfer/
- Follow download instructions
- Use this to copy apps to your device directly
- Navigate to Oracle and download the OSX version
- Then open Terminal and input
brew install android-sdk
(uses Homebrew) - After the download, input
andriod
into Terminal to open the Andriod SDK - Refer to the Facebook Docs to determine the SDK Packages to install
- Open Terminal and run
brew install maven
(uses Homebrew) - Run
mvn -v
to ensure the download was complete
- Navigate to Jetbrains IDEA to download the community edition.
- Leave the default setting during installation.
- Opening IntelliJ for the first time, you may need to point the Project SDK to your previously downloaded Java 8 JDK. Using the folder selector, your JDK should be located at /Library/Java/JavaVirtualMachines/jdk1.8.0_121.jdk/Contents/Home
- Install through the Mac App Store
- Note you will follow the next steps only after downloading Xcode for iOS development and/or downloading Andriod with Java for Andriod development
- In Terminal, run
sudo npm install –g react-native-cli
- Also in Terminal, run
sudo npm install -g rninit
- Navigate to https://serverpress.com
- Click on the Free Download
- Open Terminal and run
brew cask install dotnet
(uses Homebrew) - Run
dotnet --version
to ensure the download was complete - You may also need to install the dotnet SDK from (here)[https://www.microsoft.com/net/core#macos]
- Once the SDK is installed, you can try step 2 again.
- Visit https://www.visualstudio.com/ for the download
- Install the C# extension for Visual Studio Code (done within Visual Studio Code extensions)