Skip to content

chomman/Vue.js-with-Sails.js-backend-example-project

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Vue.js with Sails.js backend example project

This project is for those who are new to single-page applications and want to learn through a real example. Besides that, it should cover most of the features from Sails.js and Vue.js.

Getting started

Prerequisites

I created a Vagrant box with MongoDB, Node.js, Sails.js and Vue.js and also a Docker file. Or manually install Node.js and Sails.js.

Get Node.js

$ curl -sL https://deb.nodesource.com/setup_7.x | sudo -E bash -
$ sudo apt-get install -y nodejs

Get Sails.js

$ sudo npm install sails -g

Install modules

$ cd frontend && npm install
$ cd ../backend && npm install

Production

First, you have to build up your Vue.js components and merge them with Sails.js. This can be done with cd frontend && npm run build. Now do cd ../backend && sails lift and then open your browser and go to localhost:1337.

Development

cd backend && sails lift and then cd ../frontend && npm run dev. After that open localhost:8080 in your browser.

Components used

The following components are used in this project.

This is the backend and data provider.

Handle frontend data with a MVVM.

A state pattern.

Frontend framework. The design part.

HTTP client for Vue.js.

Router for the frontend.

To do

  • More tests
  • more multilingualism
  • file uploads
  • upgrading to Sails.js 1.0
  • mobile version
  • finalize checkout
  • use modules for Vuex

Code style

This project fulfils the JavaScript Standard Style.

About

Vue.js with Sails.js backend example project

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 96.6%
  • Vue 3.3%
  • HTML 0.1%