Giter Club home page Giter Club logo

isomorphic-boilerplate's Introduction

#Isomorphic Boilerplate

Build Status Coverage Status Dependency Status

isomorphic webapp boilerplate 中文文档

Quick start develop your isomorphic webapp with express and react

  • runnpm install
  • runnpm run develop-webpack to inject necessary files to the template file
  • runnpm run develop to get develop server start

Deploy to production environment

  • runnpm install --production
  • runnpm install pm2 -g(more instructions in pm2 documention)
  • runpm2 start app.js --name <Project Name> to deploy

Directory structure

client/
    |-- __tests__/  #client unit tests
    |-- asset/      #images,fonts and so on
    |-- bundle/
        |-- common/ #public css and js
        |-- component/ #component's css
        |-- error/  #error page's entry js and css
        |-- index/  #index page's entry js and css
        |-- .../    #more your own page's entry js and css,like index page
    |-- vendor/     #third party libraries
server/
    |-- __tests__   #server unit tests
    |-- controller/ #express routes directory
    |-- lib/        #server libraries,util and helper modules inside
    |-- router.js   #server router,all the routes is defined here
    |-- bootstrap.js #initialize application,load middlewares and setup
shared/
    |-- common/     #common web components,etc:error
    |-- lib/        #shared libraries(client and server)
    |-- component/  #common component,etc alert,selected
    |-- chunk/
        |-- common/     #component in common use
        |-- index/      #index page's web components
        |-- .../        #more your own page's web components,like index page
task/
    |-- config/
        |-- module.json #define page's path and module config
        |-- vendor.json #define third party libraries
    |-- environment.js  #define module's env variables
    |-- develop-server.js       #webpack dev server entry file
    |-- vendor-css.js   #third party library's css compile
    |-- webpack-inject.js #inject compiled js and css into templates
    |-- webpack.develop.js #compile modules and vendors for develop
    |-- webpack.production.js #compile modules and vendors for production
    |-- webpack.hot-update.js #compile modules and vendors for develop in HMR
view/
    |-- layout.html #global layout template
    |-- index.html  #index page's template
    |-- *.html      #more your own page's template
app.js      #web application enrty file
gulpfile.js #task entry file

isomorphic-boilerplate's People

Contributors

ali322 avatar

Watchers

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