Coder Social home page Coder Social logo

react-redux-admin-boilerplate's Introduction

React Admin Boilerplate

A simple admin boilerplate can be reused in new applications.

Getting Started

$ npm install

Local Installation

Configuring json-server

Add db.json

$ mkdir json-server
$ touch json-server/db.json

Add a route to db.json

# db.json
{
  "sample_list": [
    {
      "id": "1",
      "name": "item1",
      "price": 3.99
    },
  ]
}

(Optional) configure customize port to json-server

$ touch json-server/config.json

# config.json
{
	"port": 5858
}

More about json-server

Configuring dev env

# default config/env.config.js 
const env = {
  development: {
    mountPath: 'http://localhost:5656/',
    apiEndpoint: 'http://localhost:5858/'
  },
  stage: {
    mountPath: 'http://stage.com/',
    apiEndpoint: 'http://api.stage.com/'
  },
  production: {
    mountPath: 'http://production.com/',
    apiEndpoint: 'http://api.production.com/'
  }
}[process.env.NODE_ENV || 'production'];

module.exports = env;

Start the dev server

$ npm run dev

# Open localhost:5656

Try to send a GET request to check api route work

$ curl http://localhost:5858/sample_list/1
{
	"id": "1",
	"name": "item1",
	"price": 3.99
}

Dependencies

  • React
  • Redux
  • babel-loader
  • Immutable.js
  • Webpack

TODO

  • production build config
  • deployment configuration
  • eslint
  • test

react-redux-admin-boilerplate's People

Contributors

tcchong avatar

Stargazers

chihiro avatar

Watchers

James Cloos avatar chihiro 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.