Home - makersquare/clicker GitHub Wiki

Welcome to the clicker wiki!

Dump everything here; we'll break up and organize later.

Verified Accounts

Anyone can sign in with GitHub. However, only verified accounts can create classes.

Creating Memberships

When a verified account creates a class, a membership of type teacher automatically gets created for them and the class. All teachers in a class can add other teachers and/or students to join that class.

To reduce friction, creating a membership requires no accept. In other words, if a teacher invites a student to their class, a membership of type student is automatically created to connect that student to that class.

NGINX Configuration for Multiple Servers in Development

Multiple servers for development. Proxy Server.

For Mac:

-to install nginx

brew install nginx

-to find the file location on mac

brew info nginx

Then, enter sudo and the route that brew gives you.

Edit this file and add the following code into the http block

# Rails Server
	server {
	  listen       app.clicker.dev:80;
	  server_name  app.clicker.dev;

	  location / {
	    proxy_pass http://127.0.0.1:3000;
	  }
	}

	# Node Server
	server {
	  listen       stream.clicker.dev:80;
	  server_name  stream.clicker.dev;

	  location / {
	    proxy_pass http://127.0.0.1:4000;
	    proxy_set_header Connection '';
	    proxy_http_version 1.1;
	    chunked_transfer_encoding off;
	    proxy_buffering off;
	    proxy_cache off;
	  }
	}

Then, search for your /etc/hosts file and add the following to it at the top near your localhost definition:

127.0.0.1 app.clicker.dev
127.0.0.1 stream.clicker.dev

Then, in the command line, type

sudo nginx -s reload

Run your rails server and go to app.clicker.dev and it should work.

For Linux:

sudo apt-get install nginx

Finding the file location is a little more difficult. It is probably in etc/nginx/nginx.conf, but you don't have brew to hold your hand. The file name is definitely going to be nginx.conf, though.

Then, follow the mac instructions in the same manner. I'll paste them again, in case you skipped them.

Edit this file and add the following code into the http block

# Rails Server
	server {
	  listen       app.clicker.dev:80;
	  server_name  app.clicker.dev;

	  location / {
	    proxy_pass http://127.0.0.1:3000;
	  }
	}

	# Node Server
	server {
	  listen       stream.clicker.dev:80;
	  server_name  stream.clicker.dev;

	  location / {
	    proxy_pass http://127.0.0.1:4000;
	    proxy_set_header Connection '';
	    proxy_http_version 1.1;
	    chunked_transfer_encoding off;
	    proxy_buffering off;
	    proxy_cache off;
	  }
	}

Then, search for your /etc/hosts file and add the following to it at the top near your localhost definition:

127.0.0.1 app.clicker.dev
127.0.0.1 stream.clicker.dev

Then, in the command line, type

sudo nginx -s reload

Run your rails server and go to app.clicker.dev and it should work.