Git Product home page Git Product logo

openws_one's Introduction

Hi there 👋

openws_one's People

Contributors

mfojtik avatar petrblaho avatar roshiro avatar vbalazs avatar

Stargazers

 avatar

Watchers

 avatar

openws_one's Issues

Cannot perform any operations in Mongodb in Openshift.

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

Return id as string when as_json is requested

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

Ideas for landing page

Landing page must:

  • be simple;
  • be clean;
  • straight to the point;

Target audience:

  • Developers prototyping web & mobile apps;

Message to convey:

  • For testing;
  • Save JSON in one step;
  • No signup;
  • Free;

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:

  • Get colour pattern ideas here

Widget with options to:
save

  • textbox to type collection name (suggest one name);
  • textarea with JSON to be saved;
  • button to save;

get

delete

Implement caching database

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.