joshgav / node-sql-api

REST API for SQL DB through Tedious

Repository from Github https://github.comjoshgav/node-sql-apiRepository from Github https://github.comjoshgav/node-sql-api

A simple app which connects to SQL with tedious and surfaces records as objects via an Express API.

Caveats

  • Make sure the SQL server firewall allows access to the web server.
  • Assumes databse is populated with AdventureWorksLT sample database.
    • Instructions here.
    • Also an option when creating a SQL DB in the portal.
  • Use SQL Authentication (username:password) for easy compat with Azure SQL.

Setup

  1. Copy .env.template to .env in your own repo and populate the variables. The Azure ones are for use with scripts/webapp-deploy.sh.
  2. npm install
  3. node . (from repo root).
  4. Browse or curl http://localhost:3000/customers.

Alternatively, deploy the web app to Azure Web Apps, populate App Settings with the same env vars, and open the SQL server firewall.

License

See LICENSE.md.

About

REST API for SQL DB through Tedious

License:MIT License


Languages

Language:JavaScript 70.2%Language:Shell 25.4%Language:HTML 4.4%