Git Product home page Git Product logo

quiz-game's Introduction

Go

Setting up

  • For Ubuntu: Look here
  • For MacOS: Look here
  • Apart from above tutorial, add the following to your .bashrc:
              export GOBIN=$GOPATH/bin
  • All your code (across projects) goes into one folder. So have your environment variables set up specific to where your code is.
  • bin stores executables, pkg stores external packages, src has all your source code.

Basics

  • The documentation is very well written. You're all advised to go through it.
  • The Golang book is an absolute must for you to understand the fundamentals of Go.
  • Similar to C
  • All referred code is up on this repository.
  • Hello world program
  • Defining packages
    • Functions inside a package must start with a capital letter. Or else they won't be accessible outside the package.
    • Each package must consist of a directory along with a .go file of the same name inside the directory.
  • Installing third party packages; use go get. An example:-
        go get -u -v gopkg.in/mgo.v2
  • 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

React

Setting up

  • 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
  • You can run the app by running yarn start
  • node_modules contains all your external packages.
  • package.json is a json file that contains all the environment requirements of your project. It is similar to the requirements.txt file we saw for python.
  • public stores some static content. The index.html file is going to render whatever code you write. You will need to change that based on your application's design.
  • bash yarn build builds your code into a production ready application. The contents are stored in the build directory.
  • src contains all of your code. This should follow a good directory structure. Read more into it over here.
  • Alternate structure to follow can be found here

quiz-game's People

Contributors

rutwik99 avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.