roshiro / openws_one Goto Github PK
View Code? Open in Web Editor NEW☁️ The public, open-source JSON storage service
Home Page: https://openws.org
License: MIT License
☁️ The public, open-source JSON storage service
Home Page: https://openws.org
License: MIT License
Today the API returns an empty body and code 201
.
Problems:
The reason in migrating to heroku is because OpenShift doesn't allow Ruby + NodeJS running in the same instance.
Getting the JSON below when doing a POST
:
{
"msg": "not authorized for insert on openws.employees (16544)"
}
In the server:
[ 2016-10-19 15:11:51.1750 189390/7f7dc8384700 Pool2/Implementation.cpp:1274 ]: [App 204200 stdout] D, [2016-10-19T15:11:51.174906 #204200] DEBUG -- : MONGODB | 580787c47628e105a700006c-roshiro.rhcloud.com:37941 | openws.insert | FAILED | not authorized for insert on openws.employees (16544) | 0.003748378s
Investigate what are the best practices and what's the friendlier way to search documents passing more complex parameters.
Fix typo in ... to handle your data when prototyping you app anymore
Should be your
instead of you
.
Needs to convert from BSON id style:
{
"_id": {"$oid":"52d3fdfd53656e5180020000"},
"changed_at":"2014-02-15",
"created_at":"2014-01-13T15:53:49.444+01:00",
"updated_at":"2014-01-13T15:53:49.444+01:00"
}
to:
{
"id": "52d3fdfd53656e5180020000",
"changed_at":"2014-02-15",
"created_at":"2014-01-13T15:53:49.444+01:00",
"updated_at":"2014-01-13T15:53:49.444+01:00"
}
Solution:
According to this blog, we can user initialisers to achieve that:
# config/initializers/mongoid.rb
module Mongoid
module Document
def as_json(options={})
attrs = super(options)
attrs["id"] = attrs["_id"].to_s
attrs
end
end
end
Landing page must:
Target audience:
Message to convey:
Copy:
"Free, Open Source, Public JSON storage. Perfect for prototyping web & mobile apps"
"Save any JSON you want"
"No authentication, no signup, no credit card needed."
Resources:
Widget with options to:
save
get
delete
Add instructions on how to setup locally
Still needs to decide on best storage. Memcached? Redis?
The idea here is only to setup the caching database, not cache responses for performance yet.
Rack::Attack
depends on caching db.
Decide on what's the best approach to clean up old documents.
At first throttle by IP address, allowing each IP address X
number of requests per minute;
An alternative would be to return:
{
"total": "158",
"pages": "4",
"page": 1,
"items": [{...}]
}
So the API should take page
query string.
Applications CRUD
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.