Code Monkey home page Code Monkey logo

mobx-crud-example's Introduction

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.

git clone [email protected]:brandiqa/mobx-crud-example.git
cd mobx-crud-example

# Install frontend dependencies
yarn install

# Install backend dependencies
cd backend
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:

# babel
REACT_APP_BABEL_STAGE_0=true
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:

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.

mobx-crud-example's People

Contributors

brandiqa avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

mobx-crud-example's Issues

Requires Python, Visual C and Admin permission to run

Hi,

I went through the source code on this project and it looks awesome.

However after downloading it and trying to compile this project, I hit a lot of issues. Firstly it requires Python 2.7. Why an NPM project needs this is beyond me. Second I found that "windows-build-tools" had to be installed, and this required administrative permissions on windows. Even after doing that, and then running "yarn install", I'm still getting the below error.

Not being an expert in the Node.js world, I'm going to give up on this for now and try find a different sample code base.

ode-sass\build\binding.sln" on node 1 (default targets).
ValidateSolutionConfiguration:
Building solution configuration "Release|x64".
MSBUILD : error MSB3428: Could not load the Visual C++ component "VCBuild.exe". To fix this, 1) install the .NET Framework 2.0 SDK, 2) install Microsoft Visual Studio 2005 or 3) add the location of the component to the system path if it is installed elsewhere. [C:\code\mobx-crud-example
ode_modules
ode-sass\build\binding.sln]
Done Building Project "C:\code\mobx-crud-example
ode_modules
ode-sass\build\binding.sln" (default targets) -- FAILED.

Build FAILED.

"C:\code\mobx-crud-example
ode_modules
ode-sass\build\binding.sln" (default target) (1) ->
(src\libsass target) ->
MSBUILD : error MSB3428: Could not load the Visual C++ component "VCBuild.exe". To fix this, 1) install the .NET Framework 2.0 SDK, 2) install Microsoft Visual Studio 2005 or 3) add the location of the component to the system path if it is installed elsewhere. [C:\code\mobx-crud-example
ode_modules
ode-sass\build\binding.sln
0 Warning(s)
1 Error(s)
Time Elapsed 00:00:01.26
gyp ERR! build error
gyp ERR! stack Error: C:\\Program Files (x86)\\MSBuild\\14.0\\bin\\msbuild.exe failed with exit code: 1
gyp ERR! stack at ChildProcess.onExit (C:\code\mobx-crud-example
ode_modules
ode-gyp\lib\build.js:285:23)
gyp ERR! stack at emitTwo (events.js:126:13)
gyp ERR! stack at ChildProcess.emit (events.js:214:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
gyp ERR! System Windows_NT 10.0.14393
gyp ERR! command "C:\\apps\
odejs\
ode.exe" "C:\\code\\mobx-crud-example\
ode_modules\
ode-gyp\\bin\
ode-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
gyp ERR! cwd C:\code\mobx-crud-example
ode_modules
ode-sass
gyp ERR! node -v v8.9.4
gyp ERR! node-gyp -v v3.6.0
gyp ERR! not ok

Really hope that maybe this could be looked at and the setup/prerequisites documentation updated.

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.