[RELEASE] Coronium LS v1.0.0-beta

I just made a fourm thread if you want to share your code
https://forums.coronalabs.com/topic/64778-coronium-ls-code-share/

You share how ever you want Dropbox, corona file upload, Google Drive, github, etc

So I’m not sure if I’m doing something wrong or there’s an error, I’m trying to just list the mongo databases

-- Coronium Cloud local api = cloud.api() function api.post.test( in\_data ) local mongo = cloud.mongo.new() local dbs, e = mongo:databases() if not dbs then return cloud.error( e ) end return dbs end api.get.test = api.post.test return api

and I get internal error (I changed the IP address and domain name) …

[error] 2605#0: *191 lua entry thread aborted: runtime error: unknown reason

stack traceback:

coroutine 0:

[C]: in function ‘error’

/usr/local/cloud/lualib/resty/mongol/colmt.lua:57: in function ‘docmd’

/usr/local/cloud/lualib/resty/mongol/colmt.lua:287: in function ‘query’

/usr/local/cloud/lualib/resty/mongol/dbmt.lua:16: in function ‘cmd’

/usr/local/cloud/lualib/resty/mongol/init.lua:68: in function ‘databases’

/usr/local/cloud/lualib/cloud/mongo.lua:67: in function ‘databases’

/usr/local/cloud/apps/echo/api.lua:8: in function ‘api_func’

/usr/local/cloud/lualib/cloud/input.lua:149: in function ‘request’

content_by_lua(cloud_server.conf:116):5: in function <content_by_lua(cloud_server.conf:116):1>, client: 00.00.00.00, server: localhost, request: “POST /echo/test HTTP/1.1”, host: “xxxxxx.xxx”

HUGE Admin request. Please start new threads for new topics. This thread has a chance to become a huge monolithic mess of hijacked thoughts. Feel free to discuss the announcement here, but if you’re building a module and want to talk about it, or you’re having an error, those all need to be their own threads.

Chris was on Corona Geek Monday talking about this. I don’t know what Charles’ plan is with when the show will be up on https://www.youtube.com/user/CoronaGeek but one of the things that stood out to me from Chris’ presentation was that the older Coronium was a hodge-podge collection of API calls that were not consistent.  In other words some would return data, others would use a listener function. There HTTP POST calls, GET calls, PUT calls.  In the new system everything works the same. If you know network.request() then you won’t have any issues with the Coronium LS calls.  It’s also much more modular and you can add your own mods. As an Open Source project, this framework will lend itself better community enhancements.  (I hope I’m characterizing this properly). 

I’ve not had time to dive through all of the docs yet and I’m running on just his presentation, but it sounds like it’s going to be awesome. I’ve got to move a couple of personal websites off of my DO server to my other web hosting company, so I can blow away that instance and get a Coronium LS instance up to start messing with.

Oh and a huge feature: All LS endpoints can generate JSON, plain text (for Internet of Things devices) and HTML. If Chris can add a small feature to this, module developers could detect who’s hitting the endpoint and choose what to output. Imagine someone hitting your leaderboard endpoint from a web browser and getting back a well formatted HTML page but if it came from a Corona app, it would smartly deliver JSON data for the app to format.

Rob

Hi folks,

I’m closely watching (and coding), so don’t think your errors are going unnoticed, especially in terms of “getting started” docs.

Gotta give credit where credit is due; the “auto-content” negotiation idea was given by Rob. It’s great idea and will be an option in the near future.

Bugs, Installation, and Enhancement Issue Reporting

I didn’t really think this part through well, but to keep a handle on fix requests, enhancements, and bugs, all issues will need to be logged with the appropriate “issue tracker” on GitHub.

If you want some type of response to your request, it must reside in the issue tracker. Don’t feel ignored if you don’t get a response otherwise. It’s the only way to keep things orderly if we (and I mean the community) want to do this right.

Core and Deployhttps://github.com/coroniumcloud/Coronium-LS/issues

Corona SDK Module : https://github.com/coroniumcloud/Coronium-LS-Module/issues 

Documentationhttps://github.com/coroniumcloud/Coronium-LS-Docs/issues

Thank you for taking time to report, it’s very appreciated!

Cheers.

I’ve made some updates to the original post for more details and options.

Cheers.

I’ll get some clearer docs together for this process. Localhost was the main priority for beta so a little lacking in other deployments.

Thanks!

I should be deploying AMIs shortly, just cleaning a few things up. Currently Amazon AMIs are auto generated, so there isn’t really a process for “building” one.

@cublah Logged your issue. https://github.com/coroniumcloud/Coronium-LS/issues/3

Thanks again.

Great that you added the issues to github, as you say better to get it all in one place. Just a quick question, when changes are done to the code what is the best way to upgrade the current server code?

[quote name=“develephant” post=“334473” timestamp=“1469649877”]@cublah Logged your issue. https://github.com/coroniumcloud/Coronium-LS/issues/3   Thanks again.[/quote] Thanks Chris, you are doing an awesome job :slight_smile:

So how do we update to the latest version? do we just copy over the changed files or do we have to create a whole new snapshot at DigitalOcean?

You should be able to reinstall it

But creating a new snapshot and then using that snapshot would delete anything that you’ve done right?

I honestly have not used Coronium LS but I imagine Chris does not write over important files. I would make a backup just in case.

When I updated my localhost, I started fresh. Make sure to backup/export any databases you have, as well as any lua files you’ve created/edited (like the api.lua file). When the new installation is set up, make sure to update your api key in your cloud initialization client-side.

I’m sure there will be a better way to do it, but since it is a beta after all, I figured that starting fresh is the best way to do things.

This discussion about snapshots and how updates are handled is a prime example of hijacking the thread. Please start a new thread for this. We have a whole forum for Coronium. Please use it.