News for hackers. Stuff that matters.
Re:Show HN: WordsAPI by impostervt on Monday January 05, 2015 @06:13PM (#8841894)
It's a Node/express app. The word data is in Postgres (hosted by heroku), user/metric data is in mongo (via mongolab.com). Hosting is from heroku fronted by cloudflare.
Re:Show HN: WordsAPI by kamladi on Tuesday January 06, 2015 @05:43PM (#8847608)
What lead you to use Mongo for userdata/metrics and Postgres for words? Are there specific features of each that you're using? I'm new to both, so just trying to learn which use cases prefer one over the other...
Re:Show HN: WordsAPI by ghchinoy on Tuesday January 06, 2015 @02:03AM (#8843232)
Thank you! Impressive. How do you limit anonymous web user's queries?
Re:Show HN: WordsAPI by impostervt on Tuesday January 06, 2015 @06:39AM (#8843874)
Requests made for the demo don't have an access token. On the back end I look for this case, and then see if the request has "when" and "encrypted" parameters. "when" is just a date/time stamp, and "encrypted" is the same thing..encrypted. If I see both those params, I decrypt the "encrypted" and make sure it matches the "when" to validate the server created it, and make sure the "when" is less than one hour.

Otherwise, all requests require an access token.

Re:Show HN: WordsAPI by bovermyer on Tuesday January 06, 2015 @08:56AM (#8844307)
What do you use to cache requests?
Re:Show HN: WordsAPI by impostervt on Tuesday January 06, 2015 @09:57AM (#8844567)
Redis & cloudflare.
Re:Show HN: WordsAPI by kamladi on Tuesday January 06, 2015 @03:31PM (#8846839)
What lead you to use Mongo for userdata/metrics and Postgres for words? Are there specific features of each that you're using? I'm new to both, so just trying to learn which use cases prefer one over the other...
Re:Show HN: WordsAPI by kamladi on Tuesday January 06, 2015 @03:30PM (#8846823)
What lead you to use Mongo for userdata/metrics and Postgres for words? Are there specific features of each that you're using? I'm new to both, so just trying to learn which use cases prefer one over the other...
Re:Show HN: WordsAPI by kamladi on Tuesday January 06, 2015 @03:30PM (#8846820)
What lead you to use Mongo for userdata/metrics and Postgres for words? Are there specific features of each that you're using? I'm new to both, so just trying to learn which use cases prefer one over the other...