Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Loopback Server #3

Open
mohammadmortazavi87 opened this issue Jul 1, 2017 · 5 comments
Open

Loopback Server #3

mohammadmortazavi87 opened this issue Jul 1, 2017 · 5 comments

Comments

@mohammadmortazavi87
Copy link

Hi.
I have a question about the component. We use Loopback for server side, and Loopback works with Node.Js. Is this component working on this conditional?
https://loopback.io/

@CMCDragonkai
Copy link
Member

CMCDragonkai commented Jul 1, 2017 via email

@mohammadmortazavi87
Copy link
Author

mohammadmortazavi87 commented Jul 1, 2017

Thanks for your responding.
do I have to use this at the middleware? I used the code at my server.js like this.

`var loopback = require('loopback');
var boot = require('loopback-boot');
var app = module.exports = loopback();
var snapsearch = require('snapsearch-client-nodejs');
app.middleware('parse:before', multer({ dest: 'temp/' }).single('image'))
app.start = function() {
return app.listen(function() {
app.emit('started');
var baseUrl = app.get('url').replace(//$/, '');
console.log('Web server listening at: %s', baseUrl);
if (app.get('loopback-component-explorer')) {
var explorerPath = app.get('loopback-component-explorer').mountPath;
console.log('Browse your REST API atnode . %s%s', baseUrl, explorerPath);
}
app.get('/', function (request, response,next) {
// response.send('Was not a robot and we are here inside app');
next();

});

});
};`

@CMCDragonkai
Copy link
Member

CMCDragonkai commented Jul 1, 2017 via email

@mohammadmortazavi87
Copy link
Author

Thanks for your responding. As I mentioned before, I used the codes and It worked in localhost. When I uploaded it, the website did not work. Do you have any idea for this problem? We use React for client side and loopback for server side.

Thanks

@CMCDragonkai
Copy link
Member

CMCDragonkai commented Jul 16, 2017 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants