Created
July 13, 2018 06:39
-
-
Save jermsam/7bc9f3d11f036259d228f164f2bd94d3 to your computer and use it in GitHub Desktop.
Exposing the remote end to the react app
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// src/feathers.js | |
import io from 'socket.io-client' | |
import feathers from '@feathersjs/client' | |
// Socket.io is exposed as the `io` global. | |
const socket = io('http://localhost:3030') | |
// @feathersjs/client is exposed as the `feathers` global. | |
const client = feathers() | |
.configure(feathers.socketio(socket)) | |
//incase we later have to do authentication | |
.configure( | |
feathers.authentication({ | |
storage:window.localStorage | |
}) | |
) | |
export default client |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment