GithubHelp home page GithubHelp logo

nattr's Introduction

Build Status

Nattr

A chat application that interlaces social media feeds.

Installation

Dependencies

Currently there is nothing other than Javascript in this application so our depenecy list is rather short:

  • nodejs
  • mongodb

Getting started

Once node is installed, all we need are the dependencies and the gulp CLI

$ npm install
$ npm install gulp -g

Development

Private config

You will need to add a secret.json file to the config folder. The secret.json file contains twitter api tokens and secrets that you will need. It should look like:

{
    "twitter_consumer_key": "KEY",
    "twitter_consumer_secret": "KEY_SECRET",
    "twitter_token": "TOKEN",
    "twitter_token_secret": "TOKEN_SECRET",
    "admin_user_name": "ADMIN_USER_NAME",
    "admin_user_password": "ADMIN_USER_PASSWORD",
}

Please note tat secret.json is excluded from the repository via the .gitignore file. This is a good thing. If you wish to commit it anyway, either remove the entry in the .gitignore or rename the file to local.json.

Run gulp development tools

Gulp will compile ReactJS components, css and what not as well as recompiling the right things when files change. It will also run your tests and nag you when they go wrong.

$ gulp

Run gulp dev server

Running the development server in the same gulp processs as the watchers was often a pain with previous projects, so this time we will run it in a new tab and process. It doesn't really do much beyond restarting itself when files change.

# in a new tab...
$ gulp server

Production

Production config

As per the local development settings, you will need to add the twitter tokens and keys. You can do this in a JSON config file with the same name as NODE_ENV eg production.json or as command line arguments or env variables (this is what I do on Heroku). See the nconf docs for more information.

Asset compilation

We don't want to be running gulp on Heroku, so we use the npm postinstall hook to do a final production version of our css and js. Heroku will do this all by itself. It's really important that the destination folders exist, see the build folder readme for more details.

nattr's People

Contributors

dakuan avatar

Watchers

 avatar  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.