Boilerplate for SSAD Assignment 2
If you're using this repo as reference, star it.
- For Ubuntu: Look here
- For MacOS: Look here
- Optional: If you want to have your executables to be stored in
bin, add the following to your .bashrc:
export GOBIN=$GOPATH/bin- Installing third party packages; use
go get. An example:-
go get -u -v gopkg.in/mgo.v2- You'll have to install the packages before you run the code, since my OS may be different from yours. Packages used in this tutorial -
go get -u -v github.com/gin-gonic/gin
go get -u -v github.com/jinzhu/gorm
go get -u -v github.com/jinzhu/gorm/dialects/sqlite
go get -u -v github.com/gin-contrib/cors- To run a program:-
go run file.go- First, install node. Then install yarn (because npm is not very nice)
- Ubuntu:
curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash -
sudo apt-get install -y nodejs
npm install -g yarn
yarn global add create-react-app- MacOS:
brew install node
npm install -g yarn
yarn global add create-react-app- Then, create a new React application by running the following:
create-react-app name_of_app- In the app I've made, make sure you run
npm installor justyarninside thereact-appfolder. This command automatically looks at thepackage.jsonfile and installs the required packages into thenode_modulesfolder. - You can run the app by running
yarn start