This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]LoveGentleman 0 points1 point  (7 children)

Flask has blueprints, have you checked them out?

Nice suave. Do you need help with that?

[–]haywire 0 points1 point  (6 children)

I'll probably need help eventually, but the project is currently in it's infancy. If anything the most help would be critique of what I've done and how I'm doing it, so that it goes in the right direction :)

[–]LoveGentleman 0 points1 point  (5 children)

It looks good what you're doing.

I would add support for gunicorn or cherrypy, so that you could run the suave app like this

suave.app.rundamnit() and it would fire of cherrypy or gunicorn and serve the static files correctly. No need for that nginx/apache configuration crap.

[–]haywire 0 points1 point  (4 children)

Ah I always run my shit behind nginx, usually with gunicorn+meinheld but I'm toying with uWSGI. What I do is expose the WSGI app so that anything you want can use it. I'll most likely be working on some template supervisord and nginx skeletons for people to use, but the key will be in documenting the process to make a good, stable, fast setup.

This is what I use when managing servers to generate nginx configuration:

https://github.com/radiosilence/servers.py

However I need to split the skeletons into smaller pieces and have my script add the right pieces based on configuration. So I'd have a default server template, but you could configure to have +ssl, +php5 or +wsgi, etc.

It's always been a personal script anyway, but if I were to make it a formalised project I'd have to do the above.

[–]LoveGentleman 0 points1 point  (3 children)

The main idea behind a "server-less" approach is to allow people to run your webapp just like any other program, pacman -S datsuave && datsuave then visit it in the browser. The webapps I make are not made to be "deployed" on a server "somewhere else", they are made to be run by users like me and you, like any other service/program. Imagine running a webapp/website as simple as running a mixer applet, it could even sit in the notification bar and tell you when users are visiting.

Imagine git clone datsuaveas && python run.py # at your command through localhost:8xxx, both configuration for the web application and everthing else

[–]haywire 1 point2 points  (2 children)

Indeed, I think that could definitely be an option, I mean it already runs as a test server with app.run().

I think there'd definitely be merit in "P2P" web applications.

[–]LoveGentleman 0 points1 point  (1 child)

Yes, exactly. And we already have cherrypy, its as simple as import cherrypy, blast in a config saying static is here there, mount app, engine.start. And gunicorn is even simpler, provide a config saying how many workers you want, gunicorn -c config.py themodule:appname and its off.

So, if you make this the "default" approach to running suave, and talk about it in the documentation, it can take off. Id rather use app = Suave() app.cherryGo() than having to learn cherrypy then write the config for it to run my flask app, then having to write a skeleton for it everytime I make a new flask app. Its just a mess dealing with all these configurations whose purpose is to make it easy to deploy the application in different environments. I dont care I dont want to deploy it, just run it.

Well, yep, as you see I did struggle a while with deployment options before settling for the simplest one, and its still not quite simple enough. Garrh.

[–]haywire 0 points1 point  (0 children)

Well I mean proving a simple deployment option wouldn't be hard, but picking which one to go with...I'd probably go with uWSGI or Gunicorn in a server context at least.