A prestructured boilerplate to get feathers and vue quickly running for a real-time application.
This boilerplate can be built for:
- Web
- Desktop
Clone the repo:
git clone https://github.com/saul-avikar/feathers-vue-boilerplate.git
Install feathers cli:
sudo npm i -g @feathersjs/cli
If your application requires authentication run:
feathers generate authentication
All the client side methods should be put in client/libs/auth.js
Don't need authentication? The client/libs/auth.js file can be safely deleted.
For every service (users, messages, etc.) you need to run:
feathers generate service
import client from "@/libs/client";
export default {
created(){
client.service("messages").on("created", message => {
// Do something
});
}
};
Here are the commands for running in development mode
# Run on the browser with hot reload
npm run dev
# Run on the desktop
npm run build
npm run desktop
The client can be built into files ready for the desktop application to run via:
npm run build
To build the app for production run:
build:OS
Where OS can be:
- linux (defualt)
- windows
- mac
And:ia32
can be appended for ia32 builds.
The client can be built into files ready for the server with this command:
npm run build
The server that runs the REST api and delivers the build files can be run via:
npm run Server