roshnet / blogstate-api Goto Github PK
View Code? Open in Web Editor NEWA superfast API for BlogState, built with Falcon.
Home Page: https://blogstate.pythonanywhere.com
A superfast API for BlogState, built with Falcon.
Home Page: https://blogstate.pythonanywhere.com
On all endpoints that return a date (for example, on returning posts), a small script can be inserted that converts the current date format 2019-11-03
to a more convenient format, say October 30, 2019
.
There is a possible use case in the main application of using a library like MomentJS to add more convenient formats.
Currently, in cases where the query is unsuccessful, the response still has a status code of default 200.
There needs to be a suitable HTTP status code allotted to the response, to better handle and debug the API.
As of now, for POST /login
and POST /signup
, the request body needs to have a specific structure.
If that structure of request body is different from what is assumed in handling it, an exception is caused, which can cause entire server to halt, and other undesired effects.
This can be prevented by validating request body structure, and returning appropriate response if the structure is corrupt.
Error, database must be initialized before opening a connection
When subsequent requests are sent, only the first call executes.
This gives a peewee.OperationalError: Connection already opened.
error.
Peewee is configured to make a call to the database on each request, as falcon.API()
's middleware.
This seems to override the already opened connection that was opened on the first API call.
Since it's the middleware that performs the database call, a check needs to be put in the middleware on whether the current connection state is opened or closed.
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.