/node-sql-api

REST API for SQL DB through Tedious

Primary LanguageJavaScriptMIT LicenseMIT

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.