Giter VIP home page Giter VIP logo

superfeed's Introduction

Master repo for SuperFeed Stories in Ready Circle CI Code Climate

Tech Stack

  • React
  • Redux
  • RethinkDB
  • AWS Lambda

Getting Started

First, clone the repo with

git clone https://github.com/SuperFeed/SuperFeed

Next, install dependencies

npm install

Make sure RethinkDB is installed. If you're using OS X, you can install it with brew install rethinkdb. For a specific platform checkout https://www.rethinkdb.com/docs/install/.

Setting up the database

Create the database and tables with

npm run create-db

If needed, the database can be dropped with

npm run drop-db

Running the app

npm run dev

This loads a development version of the app. The node server performing SSR is started at localhost:3001, while the webpack build starts at port 3000. The node server is proxied with webpack-dev-server. The API is started with run-api.js and mirrors the AWS lambda functions. The API server listens at port 3005.

You also need to run RethinkDB in another shell, or somewhere. Run this with rethinkdb -d _db

API

The API is contained the /functions directory. Each function has a folder with an index.html file that defines the endpoint, method, and handler. The run-api.js script runs the API for local development. The server is reloaded on changes with nodemon. The API can be started standalone with npm run dev-api.

Server

The server serves the initial page render for the React app. The src/server.jsx file runs this, and matches the path for React Router. The server is reloaded on changes with nodemon. Items from the resources/static directory are also served. To run the server standalone, use npm run dev-server.

Front End

The front end is served with Webpack, and has reloading enabled. The entry point is src/client.jsx. To run the standalone front end, use npm run dev-client.

Building for production

You can build the app for production with

npm  run build

Environment Variables Used

  • NODE_ENV [production | development]: Set to production for use on server.
  • DB_ENV [production | local]: Set to local to use the local RethinkDB
  • PORT [number?]: Port number to serve off of
  • STATIC [production | local]: Set to local to serve local assets

superfeed's People

Contributors

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