GithubHelp home page GithubHelp logo

vikpe / isomorphic-webapp-starter Goto Github PK

View Code? Open in Web Editor NEW
12.0 4.0 1.0 2.17 MB

Isomorphic webapp starter (MongoDB, Express, React, Redux, Node)

License: MIT License

JavaScript 91.52% HTML 6.34% Shell 0.51% SCSS 1.63%
node react redux webpack hot-module-replacement boilerplate isomorphic express

isomorphic-webapp-starter's Introduction

Isomorphic Webapp Starter Build Status

Isomorphic web application starter running on Node.

The client consumes data from the server via a REST API.

Contents

Features

  • Automatically inject client-side changes to browser // Hot Module Replacement (HMR)
  • Automatically restart server on server-side changes // nodemon
  • Automatically run tests on code changes (+ display code coverage) // Jest
  • Client and server side ES6 support // Babel.
  • Production build script (minify and hash builds) // Webpack.
  • Code quality (linting) // Prettier
  • SASS
  • Image loading / minification

Installation

  1. Clone/download repo
  2. npm install or yarn install
  3. Download and install MongoDB (Community Server).
  4. Rename .env.example to .env and set properties to match your MongoDB URI and server URI.

Usage

Prerequisite - Make sure that MongoDB is running (mongod).

Development

  • npm run start-client-dev - Build client continously (HMR enabled) serve @ http://localhost:8080
  • npm run start-server-dev - Restart server continously (nodemon enabled) serve @ http://localhost:3000

Production

npm run start-prod

  • Builds client once (HMR disabled)
  • Builds server once (nodemon disabled)
  • App served @ http://localhost:3000

All commands / scripts

Command Description
npm run build Build app (client + server)
npm run build-client Build client (/dist/public/js/client.[hash].min.js)
npm run build-server Build server (/dist/server.min.js)
npm run clean-dist Clean dist, all files (client and server)
npm run clean-dist-client Clean dist client files (/dist/public/*)
npm run clean-dist-server Clean dist server files (/dist/server.min.js)
npm run start-prod (see description above)
npm run start-client-dev Build client continously (HMR enabled) serve @ http://localhost:8080
npm run start-server-dev Restart server continously (nodemon enabled) serve @ http://localhost:3000
npm run start-server-prod Start server once (nodemon disabled) serve @ http://localhost:3000
npm run test Run tests (once)
npm run test-watch Run tests (continously), on source or test file changes.
npm run lint Run prettier - JavaScript and SASS linter
npm run start (alias of npm run start-server-prod)

Deployment

Prerequisites

Make sure that Node and MongoDB are installed and running.

General

  1. Build app: npm run build
  2. Copy / deploy /dist/ to a folder on your server.
  3. Run app: npm run start-server-prod

See also

isomorphic-webapp-starter's People

Contributors

vikpe avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar

Forkers

ssanusi

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.