Code Monkey home page Code Monkey logo

shoutchat's Introduction

Firebase and Node.js apps that allow users to chat with users in their area. The louder they chat, the more people hear them!

Firebase Prerequisites:

1) Sign up for a Firebase account at www.firebase.com
2) Create a new Firebase App (mine is shoutchat.firbaseio.com)
3) You can host everything you need here, no need for a dedicated server!
4) Use https://www.firebase.com/docs/hosting/guide/deploying.html to deploy!
5) Note: In the firebase.json file, change "YOUR APP NAME HERE" to the name of your firebase app. In the node_app.js file, change "YOUR APP NAME HERE" to the name of your firebase app.

Node.js Prerequisites:

It is highly recommend you run your app on a dedicated server, such as a Google Compute Engine instance.

1) Install Node.js https://nodejs.org/
2) Install Redis http://redis.io/
3) Run `npm install .` in the nodejs folder to install the required modules
4) Once you enable Google Auth (see below), paste in your Client ID and Client Secret into the appropriate places in node_app.js
5) Make sure your Redis server is running using `redis-cli ping` (see: http://redis.io/topics/quickstart)
6) Note: The app will run on port 3000. 
	If you want to run the app on the standard port 80, stackoverflow.com has some great solutions. 
	Please do NOT run node as root or admin!
	If your system uses iptables, I reccomend using iptables to map port 80 to port 3000. 
	Use the following command: 
		sudo iptables -A PREROUTING -t nat -i eth0 -p tcp --dport 80 -j REDIRECT --to-port 3000

You need to enable Google Auth for your users to log in:

Follow the steps here:
https://www.firebase.com/docs/web/guide/login/google.html

For the Node.js version, the directions are the same except instead of using Firebase, put your website's url in the Authorized JavaScript origins and your website's url + /auth/google/callback in the Authorized redirect URIs

Example:

Authorized JavaScript origins
https://auth.firebase.com <- Firebase
http://localhost:3000 <- Node.js running on your local machine (for testing)

Authorized redirect URIs
https://auth.firebase.com/v2/{Your App}/auth/google/callback <- Firebase
http://localhost:3000/auth/google/callback <- Node.js running on your local machine (for testing)

Notes: This is not an official Google product.

shoutchat's People

Contributors

thesandlord avatar

Watchers

James Cloos avatar  avatar

Forkers

unlimapps

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.