SqlChat - NL to SQL: differenze tra le versioni
Da Webmobili Wiki.
| Riga 40: | Riga 40: | ||
=== Apache config === | === Apache config === | ||
Creare un virtualhost che faccia da ''reverse proxy'' per node. | Creare un virtualhost che faccia da ''reverse proxy'' per node.<br/> | ||
<code>/etc/apache2/sites-available/sqlchat.dbdemo47.com.conf</code> | |||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
Versione delle 18:04, 14 gen 2025
https://github.com/sqlchat/sqlchat
Si propone di fare query con linguaggio naturale, leggendo la struttura del database.
Non fa altro che cercare di interpretare e generare un SQL corrispondente.
Installazione in produzione
Node.js
Configurare l'ambiente per Node.js
# Scarica l'ultima versione di nvm
curl -o- https://raw.githubusercontent.com/creationix/nvm/master/install.sh | bash
source ~/.bashrc
# Installa Node.js 22
nvm install 22
nvm use 22
# Verificare con
node --version
# Verifica i rilasci ufficiali
nvm ls-remote
# eventualmente installare la versione voluta con
nvm install [version_number]
Aggiornare npm , Node Package Manager
npm install npm@latest -g
Installare pnpm, Performant Node Package Manager
npm install pnpm
Apache config
Creare un virtualhost che faccia da reverse proxy per node.
/etc/apache2/sites-available/sqlchat.dbdemo47.com.conf
#
# sqlchat.dbdemo47.com
#
<VirtualHost *:80>
ServerName sqlchat.dbdemo47.com
Redirect / https://%{SERVER_NAME}%{REQUEST_URI}
</VirtualHost>
<VirtualHost *:443>
# Basic Auth
<Location />
AuthName "Dialog prompt"
AuthType Basic
AuthUserFile /var/www/auth/.htpasswd
Require valid-user
</Location>
ServerAdmin info@designbest.com
ServerName sqlchat.dbdemo47.com
ProxyPass / http://localhost:3000/
ProxyPassReverse / http://localhost:3000/
</VirtualHost>