项目作者: brandiqa

项目描述 :
A crud mobx project using react, featherjs and mongodb
高级语言: JavaScript
项目地址: git://github.com/brandiqa/mobx-crud-example.git
创建时间: 2017-03-31T10:01:43Z
项目社区:https://github.com/brandiqa/mobx-crud-example

开源协议:

下载


MOBX CRUD EXAMPLE

Introduction

This is a simple CRUD application for managing contacts. This project demonstrates the use of React, Mobx, FeathersJS and Mongodb to manage data. Inside the root project folder is another project(backend) that holds logic for the FeathersJS back-end server. The root project was created using create-react-app tool while the back-end api server was created using Feathers Cli tool.

Requirements

This is NodeJS application is compatible with Linux, Windows and Mac platforms. Below are the dependencies that need to be installed first:

  • Nodejs version 6.10+
  • Mongodb version 3.4+
  • Yarn (latest version)

How to install

Use git clone or Download Zip option to download the software. If you are using Wndows, you need to setup Node Gyph first.

  1. git clone git@github.com:brandiqa/mobx-crud-example.git
  2. cd mobx-crud-example
  3. # Install frontend dependencies
  4. yarn install
  5. # Install backend dependencies
  6. cd backend
  7. yarn install

How to configure

At the root of the application, create a file and name it .env. Paste and save the following code in this file:

  1. # babel
  2. REACT_APP_BABEL_STAGE_0=true
  3. REACT_APP_DECORATORS=true

How to run (in development mode)

Ensure you have mongodb installed in your system and that it is running. By default, this project uses mongodb://localhost:27017/api to access the database. You can change that in mobx-crud-example\backend\config\default.json.

Start the app

This app is setup to run the backend and the client server concurrently. Just do:

  1. yarn start

Both backend server and client server will start concurrently. You can access the backend API server using a browser or REST client app like Postman using the url http://localhost:3030/api/contacts. To access the client front-end, you’ll need to open your browser (chrome recommended) using the url http://localhost:3000.