Code Monkey home page Code Monkey logo

react-kindling's Introduction

NOTE this project is not being actively maintained and contains bugs. It can be used as a starting point, but it needs work.

React.s Kindling

This is a React.js starter project. You can use it to build a client only application or a full stack node.js application.

What's included

  • Gulp - For building assets, launching development servers and deploying
  • Webpack - For bundling javascript and other assets as required
  • React Hot Loader - For quick reloads of css and js changes
  • Express - For middleware and serving pages
  • Passport.js - For authentication
  • React.js - For sheer awesomeness
  • React Router - For managing the routes of the sheer awesomeness
  • Mongoose - For talking to MongoDB
  • MaterialUi - Because not everything has to be Bootstrap

Usage

Clone this repository:

git clone [email protected]:jbasdf/react-kindling.git

Install the dependencies:

npm install

Configuration:

Change config/secrets.example.js to config/secrets.js. Change sessionSecret and set your database. If you want to use Facebook, Twitter or Google for authentication setup your keys and secrets.

Development mode with livereload:

To start node and the webpack server just type: gulp

Or start each one individually node server.js gulp serve:hot

Development

You can use React-Kindling to build a client only application or a client-server application.

Client Only

Open up settings. Change 'projectType' to 'client'. When you run 'gulp' all of the assets in the 'client' directory will be built into a client only html/js/css application. The development files will be found in /build and the production files will be in /public.

Client Server

Open up settings.

Change 'projectType' to 'client-server'. Set applicationUrl to your domain.

Pass values from the server to the client via DEFAULT_SETTINGS. This code can be found in index.ejs.

####ngrok Ngrok makes it easy to provide a public url to an application running on your local machine. This comes in handy when dealing with OAuth providers that don't permit localhost. Install ngrok - https://ngrok.com/ and then run two instances one for the node server and another for the webpack server:

ngrok --subdomain myserversubdomain 8888 ngrok --subdomain myassetssubdomain 8080

Change the subdomains to be a value you prefer and then update applicationUrl and assetsUrl in secrets.js to match your changes.

Testing

React Kindling uses Jest for tests

Run npm test

Database

Migrations

React Kindling uses MongoDB. PostGreSQL support is coming. Here are some resources:

Setup

Sensitive values live in: config/secrets.js

Build configuration lives in: config/settings.js

Deployment

Client Only

React.js Kindling can be used to build a client only application that can be deployed to Amazon S3 or Github pages or any other static hosting service

Create a production ready version of the JS bundle:

gulp build --release

Then upload the contents of the 'public' folder to your favorite service.

Deploy to Amazon React.js Kindling uses the Ruby gem s3_website to deploy. run gulp deploy:amazon

Deploy to Github Page run gulp deploy:github

Client Server

License and attribution

MIT

react-kindling's People

Contributors

bfcoder avatar bpetersen avatar colebusby avatar dearcodes avatar dittonjs avatar dspencer001 avatar jbasdf avatar kamijean avatar oxtralite avatar

Watchers

 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.