-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added access control headers; more detailed spec comments
- Loading branch information
Showing
8 changed files
with
138 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
/** | ||
* Access control: CalSTAR MA | ||
* | ||
* Provides a single unified interface into the SQL server, allowing us to use a | ||
* single connection pool to speed up queries. | ||
* This file exports a connection pool object from the mysql2 library. | ||
* For details on usage, see the package docs: | ||
* https://www.npmjs.com/package/mysql2#using-connection-pools | ||
* | ||
* If you need to change the export of this file, be VERY CAREFUL so as to prevent | ||
* changes in the interface of the exported object from affecting other files. | ||
*/ | ||
|
||
const sql = require('mysql2') | ||
|
||
// TODO store settings in a json file, or in .env | ||
const pool = sql.createPool({ | ||
host: 'localhost', | ||
user: 'telemetry', | ||
database: 'telemetry', | ||
waitForConnections: true, | ||
connectionLimit: 10, | ||
queueLimit: 0 | ||
}) | ||
|
||
module.exports = pool |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
telemetry_server/setup.sql → telemetry_server/server/setup.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters