niallobrien / feathers-chat-example Goto Github PK
View Code? Open in Web Editor NEWFeathers.js example using Vue.js and Vuex on the client to maintain state.
Feathers.js example using Vue.js and Vuex on the client to maintain state.
Might I suggest a documentation addition on the main README.md under Usage
for having mongodb installed and running. I ran into the error before realizing the dependency. Perhaps adding something like:
"This project uses MongoDB as the data store, so you will need to have it installed and an instance running."
I would submit a pull request. But I'm a newbie and have never submitted one before (said sheepishly).
I'd be great to see how to handle auth with the messageService.
For example if I add auth required for /messages
then this fails with "no auth" unless I catch it.
Should I import my app
from services and then do app.authenticate();
in the catch?
export const fetchMessages = function({commit}) {
// Call the messages service on the server via websocket
messageService.find({}).then(result => {
commit(types.FETCH_MESSAGES, result.data);
});
};
Hi Niall - First, thanks for this excellent feathersjs + vuejs example!
I'm a relative newbie to both libraries as well as to socketio, es6, and webpack/babel6 :) so I apologize in advance if I've missed something simple that caused the error.
I cloned the project and installed client and server side dependencies without an obvious problem. And starting the server showed no problem.
Then I ran npm run dev' on the client side and got the
Cannot resolve module 'socket.io-client'` error. I tried to search this down, best I could, as follows:
In client/src/service/index.js
looks like this line import io from 'socket.io-client'
is causing the error (but I'm not certain).
So, I looked for socket.io-client
, and found it in client\node_modules\feathers-socketio\node_modules\ socket.io\node_modules\socket.io-client
.
So, I'm at a loss to understand why the socket.io-client
reference in client/src/service/index.js
doesn't resolve.
Any assistance would be greatly appreciated!
I'm running on a Mac OS 10.9.5, node v.4.4.3, npm v.2.15.1. Here's the full error
npm run dev
> feathers-chat@ dev /Users/EF/Feathers/feathers-chat-example/client
> node build/dev-server.js
Listening at http://localhost:8080
webpack: wait until bundle finished: /index.html
webpack built 8129495782af01eff8d3 in 116991ms
Hash: 8129495782af01eff8d3
Version: webpack 1.13.0
Time: 116991ms
Asset Size Chunks Chunk Names
app.js 2.69 MB 0 app
ERROR in ./src/services/index.js
Module not found: Error: Cannot resolve module 'socket.io-client' in /Users/ElliotFielstein/Feathers/feathers-chat-example/client/src/services
@ ./src/services/index.js 16:14-41
Child html-webpack-plugin for "index.html":
Asset Size Chunks Chunk Names
index.html 21.6 kB 0
webpack: bundle is now VALID.
I thought I broke something when upgrading to Vue 2.0, but it seems even when checking out the current version that messages aren't removed - is this intentional, as this is only an example?
Hi Niall,
Thanks a lot for this! It's really helping me get started with FeathersJS and integrating it with Vue ๐
I'm in the process of converting this to use Vue/Vuex 2.0, so if you fancy having bringing this example up-to-date I could send a PR if you'd like.
Cheers!
Will
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.