Giter Site home page Giter Site logo

mernstack-application's Introduction

Next.js (React) + Redux + Express REST API + MongoDB + Mongoose-Crudify boilerplate

Note: this is my v1 boilerplate for React web apps. See also my Firebase and React Hooks boilerplate, GraphQL + Postgres SQL boilerplate, and Redux + REST + Postgres SQL boilerplate.

This template is based on nextjs-express-boilerplate, but with added mongoose-crudify and redux-api.

Support this project

Did you or your company find nextjs-express-mongoose-crudify-boilerplate useful? Please consider giving a small donation, it helps me spend more time on open-source projects:

Support Tom on Ko-Fi.com

Why is this awesome?

This is a great starting point for a any project where you want React + Redux (with server-side rendering, powered by Next.js) as frontend and Express/MongoDB as a REST API backend. Lightning fast, all JavaScript.

  • Simple REST API routes with MongoDB database and mongoose-crudify.
  • Redux REST support with redux-api and next-redux-wrapper.
  • Flexible client-side routing with next-routes (see server/routes.js).
  • Flexible configuration with config/config.js and .env file.
  • Hot reloading with nodemon.
  • Testing with Jasmine.
  • Code formatting and linting with StandardJS.
  • JWT authentication for client-server communication (coming).

Demo

See nextjs-express-mongoose-crudify-boilerplate running on Heroku here.

nextjs-express-mongoose-crudify-boilerplate demo on Heroku

Don’t want Redux?

This project now uses Redux and redux-api. See the no-redux branch for the (unmaintained) version without Redux.

How to use

Clone this repository:

git clone https://github.com/tomsoderlund/nextjs-express-mongoose-crudify-boilerplate.git [MY_APP]

Install dependencies:

cd [MY_APP]
yarn  # or npm install

Start it by doing the following:

export MONGODB_URI=*your mongodb url* // you can get one for free at https://www.mlab.com/home
yarn dev

In production:

yarn build
yarn start

If you navigate to http://localhost:3001/ you will see a Next.js page with a list of kittens (or an empty list if you haven't added one).

You have your API server running at http://localhost:3001/api/kittens

Deploying

Deploying on Heroku

heroku create [MY_APP]
heroku addons:add mongolab
git push heroku master

Deploying on Now

See instructions on nextjs-express-boilerplate.

mernstack-application's People

Contributors

johnsondaniyan 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.