vhs / api Goto Github PK
View Code? Open in Web Editor NEWVHS API - the Hackspace Data Store
VHS API - the Hackspace Data Store
README-like things should go here.
Queries that should return a 404 or similar error return a 200 OK with the body text containing the response code. They should actually be providing a 404 response and I-don't-really-care-what for a body.
Example:
http://api.vanhack.ca/s/vhs/data/invalidname
http://api.vanhack.ca/s/vhs/data/invalidname.json
http://api.vanhack.ca/s/vhs/data/invalidname.txt
http://api.hackspace.ca needs to be migrated to the Talk server, which uses docker to manage its web services. We'll need to create a docker image of VHSAPI, deploy it to the Talk server, test it, and then reconfigure DNS entries for api.hackspace.ca and isvhsopen.com.
Important setup files:
README.md - install notes
INSTALL.sh - moves the config scritps below
etc/service/vhsapi/run - starts perl service
etc/nginx/vhs-api - nginx config
Here is a start to a Dockerfile:
FROM ubuntu #Not sure what the Talk server is running
RUN apt-get update && apt-get install libexpat1-dev libssl-dev daemontools daemontools-run
#Do we need to apt-get carton as well?
RUN carton install
EXPOSE 3000 #VHSAPI listens on this port
CMD ["api/etc/service/vhsapi/run"]
api/src/datapoint.js
The following two function names, along with their comments, imply that the functions do more validation than they actually do. I don't know where these functions are used, so I'm not sure if it's the names and comments that are wrong, or if the body of the functions needs fixing. @interlock?
49:
// validate the space and datapoint name
_validateSpaceName: function(space, name) {
56:
// validate the space and datapoint name, value pair
_validateSpaceNameValue: function(space, name, value) {
It's taking up to 5 seconds for a value update to change the value received upon a query. I don't know enough about this framework to know if this is expected.
To Reproduce:
Prepare two web browser tabs.
Go to Query tab, and make sure the value is different from the value being submitted in the Update's querystring.
Submit Update query, i.e. go to Update URL.
Immediately switch to Query tab, press F5 repeatedly and watch for change.
Current Behaviour:
The value seems to change within 5 seconds of submitting an update.
Expected Behaviour:
The first query after an update, no matter how soon after, should return the updated value.
@interlock, do you have any idea why this is happening?
Run and commit the vendored tars that carton bundle
generates so a carton install --cached
completes faster.
Making docker builds much faster.
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.