Skip to content

Lubycon/sandwhichi-frontend

Repository files navigation

vue-ssr-starter

A Vue.js project with vue 2.0, vue-router and vuex starter kit for server side rendering.

Spec

Requirement

Frameworks

  • Express
  • Vue.js

Vue Plugins

  • vue-server-renderer
  • vue-no-ssr
  • vue-meta
  • vue-moment
  • vee-validate
  • vue-bootstrap

Router

  • vue-router

Flux

  • vuex
  • vuex-router-sync

JavaScript Libraries

  • jQuery
  • Axios
  • js-cookie
  • cookie-parser
  • q
  • lru-cache
  • cross-env
  • serve-favicon
  • popper.js

CSS Libraries, Loaders

  • Bootstrap4
  • node-sass

Module bundler

  • webpack 2.x
  • vue-ssr-webpack-plugin

Transfiler

  • babel

Linter

  • eslint

Test

  • karma
  • mocha
  • sinon
  • chai

Setup

You can choose your environment when you start the development server. env variable will be assigned to process.env.NODE_ENV by cross-env

Cloning

cd your-project
git clone https://github.com/evan-moon/vue-ssr-starter.git

Install Requirement

You can use Homebrew or download node.js directly from the node.js website.

brew install node # If you want
npm install -g forever

Development

npm install
npm run serve:env

Build

npm run build:env

Server

Use forever as the server daemon.

npm run start:env
npm run stop
npm run restart

Scripts

# Server Scripts
npm run start:env
npm run stop
npm run restart

# Dev Scripts
npm run serve:env

# Build Scripts
build:client:env
build:server:env
build:env

# Test Scripts
unit-test

Structure

/build

Config files webpack and loader

/src

Application source

  • assets
  • components
  • constants
  • mixins
  • pages
  • plugins
  • router
  • services
  • stores
  • styles

/test

  • unit

configs

  • .bablerc
  • .clang-format
  • .editorconfig
  • .eslintrc.js
  • .htmlhintrc
  • .jshintrc

ignore

  • .eslintignore
  • .gitignore

log

  • err.log
  • out.log

etc

  • robots.txt
  • travis.yml