Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » Skylark » how to setup Skylark on remote server?
how to setup Skylark on remote server? [message #60490] Sat, 09 March 2024 14:38 Go to next message
forlano is currently offline  forlano
Messages: 1185
Registered: March 2006
Location: Italy
Senior Contributor
Hello,

I was looking for some microframework able to respond with data to http requests.
I found https://crowcpp.org/master/ but looking at the example I remembered our Skylark that should do the same things... and maybe much better.

On our site, under documentation, https://www.ultimatepp.org/www$uppweb$documentation$en-us.ht ml , Skylark is disappeared. I would suggest to put it in evidence with its tutorial page.
Given the amount of projects I found in all programming languages and doing similar things to skylark, perhaps it should have its own space.

I have my own VPS server (Centos 7) that run usual PHP scripts. I would like to try to use Skylark too without interfere with the current PHP scripts. The problem is: hot to setup my server to accomodate my Skylark app?

Moreover: Skylark act as a server or just wake up when called? In this last case how to call it?
If it act as a server it should be always running. What to do if for some reason it stops to run.

Please be patient if my question looks naive. Even a link to similar topic would be to helpful.

Thanks a lot,
Luigi
Re: how to setup Skylark on remote server? [message #60491 is a reply to message #60490] Sat, 09 March 2024 22:11 Go to previous messageGo to next message
Klugier is currently offline  Klugier
Messages: 1076
Registered: September 2012
Location: Poland, Kraków
Senior Contributor
Hello Luigi,

Some time ago, I wrote network tutorial (2. Building RESTful server) in which I showed how to create REST api using U++ Core without any external dependencies. You might find it useful.

Klugier


U++ - one framework to rule them all.

[Updated on: Sat, 09 March 2024 22:11]

Report message to a moderator

Re: how to setup Skylark on remote server? [message #60492 is a reply to message #60491] Sun, 10 March 2024 08:30 Go to previous messageGo to next message
forlano is currently offline  forlano
Messages: 1185
Registered: March 2006
Location: Italy
Senior Contributor
Thanks Klugier, it is very useful.

Can that app answer multiple request simultaneasly?
I just need to learn how to put such program on the server and keep it running.

Best regards,
Luigi
Re: how to setup Skylark on remote server? [message #60511 is a reply to message #60492] Thu, 14 March 2024 11:21 Go to previous messageGo to next message
Xemuth is currently offline  Xemuth
Messages: 387
Registered: August 2018
Location: France
Senior Member
Hello Forlano.

Skylark is more than capable to respond to http requests.

https://www.ultimatepp.org/srcdoc$Skylark$Tutorial$en-us.htm l

To help you I need to know few things. First your centos is running php but you must have a web server(something like apach or nginx) to handle http requests ?
If yes then is your web server configured to awnser on default port ( 80 or 443) or do you have some customs ports ? If you have custom ports is it acceptable to you to open another port that will be used by your skylark app (or only Core RESTfull app) ?

If no then maybe what you need (you may already have it) is a reverse proxy (nginx work well) to receive http request and depending on the url forwarding request to your webserver with php or to your skylark app.

personally, this is what I have localy: Nginx web server (configured as reverse proxy) that will handle all HTTPS request that hit my network then depending on what url asked the reverse proxy will dispatch the request to all microservice I have locally (git, fews skylark apps, NAS etc...)
Re: how to setup Skylark on remote server? [message #60514 is a reply to message #60511] Thu, 14 March 2024 21:07 Go to previous messageGo to next message
forlano is currently offline  forlano
Messages: 1185
Registered: March 2006
Location: Italy
Senior Contributor
Hello Xemuth.

thank you for the answer.
I run Apache on default port.
I have no experience in reverse proxy. Your solution looks interesting but I have no clue how Nginx should work and where/how skylark should operate between the client and the apache server.
Any reference online will be helpful.

Best regards,
Luigi
Re: how to setup Skylark on remote server? [message #60519 is a reply to message #60514] Mon, 18 March 2024 10:38 Go to previous message
Xemuth is currently offline  Xemuth
Messages: 387
Registered: August 2018
Location: France
Senior Member
Hello Forlano,

Doing a quick research about Apache reverse proxy:

To configure a reverse proxy on Apache, you will need the 'mod_proxy' module enabled. You can check if it is enabled by looking for LoadModule proxy_module in your httpd.conf file. If it is commented (preceded by a #), you must uncomment it and restart Apache.

Then in your local apache server configuration, you will have to configure all your applications endpoints by doing something like that:

< VirtualHost *:80 >
        ServerName www.your_app.net
        DocumentRoot /var/www/site_with_php
< /VirtualHost >

< VirtualHost *:80 >
        ServerName www.your_app.net
        ProxyPass "/skylark_app"  " http://localhost:8080/"
< /VirtualHost >



ServerName is not mandatory. With this kind of configuration assuming you dont use the endpoint skylark_app with your php app. you will reach your localhost:8080 by typing your website address and adding /skylark_app to the url.

Don't forget to restart apach after updating the conf:

sudo systemctl restart httpd

Doc I used

hope it help

[Updated on: Wed, 20 March 2024 13:47]

Report message to a moderator

Previous Topic: Changelog Skylark 24/10/2023
Next Topic: Skylark server GUI
Goto Forum:
  


Current Time: Sun Apr 28 21:07:01 CEST 2024

Total time taken to generate the page: 0.03931 seconds