liveplant / liveplant-server Goto Github PK
View Code? Open in Web Editor NEWHome Page: https://liveplant.herokuapp.com/
License: MIT License
Home Page: https://liveplant.herokuapp.com/
License: MIT License
Let's go ahead and abandon the current dev branch that we made at HackDFW. It was a good start, but it was made under duress. I will keep the hackdfw
branch for reference.
I'm going to
This would probably do the job: https://github.com/didip/tollbooth
Besides making good use of existing HTTP status codes we should have a standard error response object.
I propose: http://jsonapi.org/format/#errors
It should definitely reset based on calls to
/votes
. Couple reasons:
- If nobody is making calls to
/votes
, nobody is on the website voting and the robot shouldn't be doing anything. "If a tree falls in the forest..."- One should be able to work on the front-end without a real robot calling the endpoint
- Avoids race conditions where the client and robot's polling is slightly out of sync. The
votes
endpoint will always have accurate information regardless of the behavior of the robot.
ty @jhliberty
@ridhoq and I are going to commit to getting the current action endpoint squared away tomorrow evening. Anybody is free to attend, just coordinate we @ridhoq and I. We don't have a definite time but will commit to one if it makes it easier for you to attend.
For the "current action" endpoint we are going to :
Let's discuss where we are going to host this thing.
I do not want this to become an exercise in hardcore devops: so I'm pretty sure I just want to host this thing on Heroku and be done with it to begin with. There is a chance this thing will go wildly viral and we will need to be able to rapidly scale. Heroku just works:tm:.
Another option would be to host on linode with our own install of http://deis.io if heroku gets too expensive. But this will steal valuable dev time from our effort.
something is wrong with the makefile
Implement logger output that can be enabled or disabled either by an argument passed to the executable at start up, or an environment variable. The logger output would print useful debug information while the server runs and responds to requests.
For example, if debug logger is enabled, and liveplant-server receives a /votes request, it would print out information about the HTTP request (and / or current application state) to the console, and / or print out any errors or other useful debugging information.
By default, debug logger statements should be disabled.
If the liveplant server is started with argument --debug
at the command line:
$ liveplant-server --debug
then the server would subsequently run with debug logger statements enabled.
Also, if the environment variable LIVEPLANTDEBUG=true
is present, this would also enable debug logger statements.
Allowing to have an way to retrieve commands from twitter to water the plant. Then, replying to the sender with a picture of the plant being watered.
It takes too long. Probably just grab it from apt or something.
@smspence almost forgot. Can you add some documentation for the /votes endpoint?
You can follow the example here: https://github.com/liveplant/liveplant-server/tree/master/schema/current_action/GET
Basically it would be cool to have a public console for streams or events by the team. You should be able to ssh into the server and manually implement commands if necessary. That way you can ask the crowd to vote on an action and then maybe ask them what intensity they want, etc.
Forgive my psuedo code, but here's some creative stats we could consider implementing as well and maybe even showing a live feed of this console. All of these functions would relay to the Arduino for machine specific instructions.
ssh [email protected]
<password>
-----------------------
//yungtom = new Plant('species','cost', 'type', 'etc');
yungtom.water(50);
Yung Tom has been watered for 50mL giving him a total of 950mL for the day since 12:00:00AM.
yungtom.nutrients(20);
Yung Tom has added 20mg of nutrients to his diet which account for 24% of his recommended daily value.
bigjohn.sunlight(15, 60);
Big John will be exposed to sunlight for the next 15 minutes at 60% intensity. This equivalent to 2 Watt-Hours of energy.
I like using https://github.com/stretchr/testify
Some example stuff here: https://github.com/austinpray/bump-bedrock/blob/master/bump-bedrock_test.go
We need to get a vagrant box up and running
It needs to get provisioned by the golang heroku buildpack. We might need to create one.
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.