diff --git a/Bookings/README.md b/Bookings/README.md index d09ab5c..fbea331 100644 --- a/Bookings/README.md +++ b/Bookings/README.md @@ -188,6 +188,22 @@ DB_PASS= DB_NAME= ``` +The environmental variables from `.env` are used within the [db.js](src/db.js) for the MariaDB Node.js Connector configuration pool settings: + +```javascript +var mariadb = require('mariadb'); +require('dotenv').config(); + +const pool = mariadb.createPool({ + host: process.env.DB_HOST, + user: process.env.DB_USER, + password: process.env.DB_PASS, + port: process.env.DB_PORT, + multipleStatements: true, + connectionLimit: 5 +}); +``` + ### Build the code Once you have retrieved a copy of the code you're ready to build and run the project! However, before running the code it's important to point out that the application uses several Node Packages. diff --git a/Flights/README.md b/Flights/README.md index 8118640..c48e25c 100644 --- a/Flights/README.md +++ b/Flights/README.md @@ -91,28 +91,38 @@ DB_PASS= DB_NAME= ``` -### Build the code +The environmental variables from `.env` are used within the [db.js](src/db.js) for the MariaDB Node.js Connector configuration pool settings: -**Important:** In order to build and run the application you will need to have NodeJS installed. You can find more information [here](https://nodejs.org/). +```javascript +var mariadb = require('mariadb'); +require('dotenv').config(); + +const pool = mariadb.createPool({ + host: process.env.DB_HOST, + user: process.env.DB_USER, + password: process.env.DB_PASS, + port: process.env.DB_PORT, + multipleStatements: true, + connectionLimit: 5 +}); +``` + +### Build the code Once you have retrieved a copy of the code you're ready to build and run the project! However, before running the code it's important to point out that the application uses several Node Packages. -For the client-side: -- [dx-react-grid](https://www.npmjs.com/package/@devexpress/dx-react-grid) -- [props-type](https://www.npmjs.com/package/props-type) -- [react](https://www.npmjs.com/package/react) -- [react-dom](https://www.npmjs.com/package/react-dom) -- [react-scripts](https://www.npmjs.com/package/react-scripts) -- [recharts](https://www.npmjs.com/package/recharts) +Executing the CLI command -For the server-side: -- [body-parser](https://www.npmjs.com/package/body-parser) -- [concurrently](https://www.npmjs.com/package/concurrently) -- [express](https://www.npmjs.com/package/express) -- [mariadb](https://www.npmjs.com/package/mariadb) (the best database in world) +``` +npm install +``` -**Quick tip:** Executing the CLI command `npm install` within the [src](src) AND [client](src/client) folders will target the the relative `package.json` file and install all dependencies. +within +* [src](src): the Node.js project +* [client](src/client): the React.js project + +folders will target the the relative `package.json` file and [install all dependencies](https://docs.npmjs.com/downloading-and-installing-packages-locally). ### Run the app diff --git a/Places/README.md b/Places/README.md index 4598e9d..2682b64 100644 --- a/Places/README.md +++ b/Places/README.md @@ -130,32 +130,38 @@ DB_PASS= DB_NAME= ``` +The environmental variables from `.env` are used within the [db.js](src/db.js) for the MariaDB Node.js Connector configuration pool settings: + +```javascript +var mariadb = require('mariadb'); +require('dotenv').config(); + +const pool = mariadb.createPool({ + host: process.env.DB_HOST, + user: process.env.DB_USER, + password: process.env.DB_PASS, + port: process.env.DB_PORT, + multipleStatements: true, + connectionLimit: 5 +}); +``` + ### Build the code -Now that you have a copy of the code you're ready to build and run the project. However, before running the code it's important to point out that the application uses several Node Packages. +Once you have retrieved a copy of the code you're ready to build and run the project! However, before running the code it's important to point out that the application uses several Node Packages. -**Client-side** +Executing the CLI command -Navigate to the [client directory](https://github.com/mariadb-corporation/Developer-Examples/tree/master/Places/src/client) and install the following packages: +``` +npm install +``` -- [google-maps-react](https://www.npmjs.com/package/google-map-react) -- [props-type](https://www.npmjs.com/package/props-type) -- [react](https://www.npmjs.com/package/react) -- [react-datepicker](https://www.npmjs.com/package/react-datepicker) -- [react-dom](https://www.npmjs.com/package/react-dom) -- [react-modal](https://www.npmjs.com/package/react-modal) -- [react-scripts](https://www.npmjs.com/package/react-scripts) +within -**Server-side** +* [src](src): the Node.js project +* [client](src/client): the React.js project -Navigate to the [src directory](https://github.com/mariadb-corporation/Developer-Examples/tree/master/Places/src) and install the following packages: - -- [body-parser](https://www.npmjs.com/package/body-parser) -- [concurrently](https://www.npmjs.com/package/concurrently) -- [express](https://www.npmjs.com/package/express) -- [mariadb](https://www.npmjs.com/package/mariadb) (the best database in world) - -**Quick tip:** Executing the CLI command `npm install` within the [src](src) AND [client](src/client) folders will target the the relative `package.json` file and install all dependencies. +folders will target the the relative `package.json` file and [install all dependencies](https://docs.npmjs.com/downloading-and-installing-packages-locally). ### Run the app