Skip to content

austinbrage/brage-js-sample

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Express + MySQL2 + Brage

Node Express MySQL MySQL

Minimal setup to get Express and MySQL2 working with Brage in Vanilla JavaScript.

Start creating new routes on the app folder [see the README file on app]

API Route

The API wraps all its dynamically created routes into the /app address

Endpoint Description
/app API Version 1

Healthcare Route

The API comes with 2 default routes in the /ping address within /app to verify both the client's connection to the api and to the database

Endpoint Queries Description
GET /ping/api none Verify API connection
GET /ping/database none Verify DB connection

Example Route

If a folder called articles with the table.sql and queries.sql files on it is created on app then the /articles route wil be added to the main /app route

When the template is created, it has an ARTICLES FOLDER to test the brage tool, run the following command

npm run dev:brage

Later when you have your own routes with your personal tables and queries check them before using dev:brage again, run the following command

npm run sqlcheck:info

Later when you have your own routes with your personal tables, these tables can be on a new datarabase before using dev:brage again, run the following command with the :dev or :test suffix

npm run dbcreate:dev

About

Express + Mysql project sample for the Brage package

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors