App connects to a remote database
MIT License
This system is designed to solve the problem of being unable to connect to an external database through VPN or other methods (where the database is not open to the public). It utilizes the TCP protocol to access the database connected to the client-side program that we have developed (the client program). The basic concept is that the user sends a SQL command request through the API, and then the server controls the client-side program connected to the database to execute the SQL command and return the results.
- VPN ( Public) TCP protocal ( Client) Request SQL API Server Client SQL *
git clone https://github.com/Anechasun/database-gateway.git
cd database-gateway
npm install
npm run start-server
npm start
npm run build
Driver
: Database types (postgresql, mysql, microsoft-sql-server)
Host
: Database server.
Port
: Database port.
Username
: Username used to establish the connection.
Password
: Password used to establish the connection.
Database
: Database name.
Code
: Client unique id.
This is just a demo API. You can customize it as needed, as shown in this example code server/index.js.
curl -X GET \
'http://localhost:3000/query?sql=SELECT * FROM users'