balderdashy / waterline-docs

WARNING: The content in this repo is out of date! See https://github.com/balderdashy/sails-docs for the most up-to-date documentation
452 stars 161 forks source link

url encoded where doesn't work with docker container #138

Open corycollier opened 7 years ago

corycollier commented 7 years ago

When I run the following url in my local environment (MacOSX, using homebrew), I get a list of results:

http://localhost:1337/review?skip=0&limit=100&where={%22survey%22:23}

However, when I run the same url against a docker built version of my code, I get an empty result. The problem appears to be the url-encoding of the where object. I can't change the front-end code that's doing this. It worked on previous servers (which I've been forced out of). I need to find a way to make the url-encoding still work.

My docker file is very basic:

FROM node
MAINTAINER me <me@me.com>

RUN mkdir /usr/share/mipr
ADD . /usr/share/mipr
RUN rm -rf /usr/share/mipr/node_modules/

WORKDIR /usr/share/mipr

RUN npm install sails -g
RUN npm install -d

CMD ["sails", "lift", "--prod"]

I'm guessing this has something to do with a JSON library that's different in OSX vs the version of linux provided by the node container.