Project
- shared
- web
- mobile
Project
var axios = require('axios') | |
var UserService = function() { | |
this.getUsers = function() { | |
return axios.get('/users') | |
} | |
} | |
module.exports = new UserService() |
"dependencies": { | |
... | |
"my-shared": "file:../shared" | |
}, |
var UserService = require('my-shared/services/UserService') | |
UserService.getUsers().then( ... |