Development Environment

Serverless Development Environment for Python, Javascript/React and Node Developers (on OSX):

Install Prerequesits Package Manger Homebrew and CLI Tools:

xcode-select --install
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

Install Runtime for Javascript and Python:

brew install node python3

Install Python and Javascript packages / Dependencies:

pip3 install virtualenv
npm install -g serverless create-react-app

Source: http://sourabhbajaj.com/mac-setup/Python/virtualenv.htmlarrow-up-right

Additional tools to improve the developer experience:

brew cask install google-chrome
brew cask install visual-studio-code
brew cask install iterm2
brew cask install postman
brew install git
git config --global credential.helper osxkeychain
brew install git-secrets

Setup a template for git to prevent checking in credentials

Sourcearrow-up-right

  1. Make a directory for the template:

  2. Install the hooks in the template directory:

  3. Tell git to use it:

  4. Install AWS patterns globally to be prevented to be checked in to git:

  5. Check the list of secrets git secrets will scan for:

It should return something like:

Now every time you run git init or git clone, your hooks will be copied into the .git directory of your freshly created repo. If you don’t want to set the template globally, you can use it as needed with git init --template ’~/.git-template’.

That covers new repo creation, and cloning, but we haven’t addressed the problem of existing repos that weren’t created with the template. Here we have a couple options:

git init is a non-destructive operation, so feel free to run it in existing repos. It’s safe, and will retroactively apply the template you specify.

OR

If you want to go “all in” and ensure that every repo has the proper hooks, here’s a scriptarrow-up-right that will recursively walk a directory, such as ~/Projects and run git secrets --install in all repos.

Setup visual studio code

List all my installed extensions:

Create project and initialise repositories

Code: https://github.com/denseidel/apis-api/commit/ecc27aaf1f7a714938d99f1b5d656a67376c934barrow-up-right

Documentation

Use Gitbooks:

Install gitbook CLI:

Initialize:

Generate output to custom folder

Git Knowledge

Or if they are the last two:

https://stackoverflow.com/a/24690646/1929968arrow-up-right

Use git stash to switch change between branches - https://www.youtube.com/watch?v=KLEDKgMmbBIarrow-up-right

Development Pipeline:

  • Use CircleCI as a SaaS as Pipeline:

  1. Add the git repo to it:

  2. Setup a project as described (e.g. add the folder .circleciwith the config.yml file)

Link to config.yml file

  • for containers

  • for serverless

Last updated