https://github.com/risingstack/mysql-large-data-handling
Code for the blogpost about handling large amount of data in Node
https://github.com/risingstack/mysql-large-data-handling
Last synced: 5 months ago
JSON representation
Code for the blogpost about handling large amount of data in Node
- Host: GitHub
- URL: https://github.com/risingstack/mysql-large-data-handling
- Owner: RisingStack
- License: mit
- Created: 2017-06-06T09:14:00.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-06-06T09:21:27.000Z (over 8 years ago)
- Last Synced: 2025-04-12T17:48:24.215Z (9 months ago)
- Language: JavaScript
- Size: 4.88 KB
- Stars: 60
- Watchers: 7
- Forks: 21
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Handling large amount of data with MySQL and Node.js
Sources for the post on RisingStack engineering of the same title.
## npm scripts
Environmental variables can be provided by placing a `.env` file in the root or when invoking the scripts.
# used env vars
- `MYSQL_HOST` defaults to `localhost`
- `MYSQL_PORT` defaults to `3306`,
- `MYSQL_USER` defaults to `root`,
- `MYSQL_PASSWORD`,
- `MYSQL_DB` defaults to `partition_test`,
### setup
Make sure you have MySQL installed and running
```bash
npm run setup
```
creates a schema defined by `MYSQL_DB`, used by the tests later on
### test
#### run all tests
```bash
npm test
```
#### run unit tests only
```bash
npm run test-unit
```
#### run integration tests only
Make sure MySQL is installed and running
```bash
npm run test-e2e
```
# Contributing
If you don't agree with anything or you found a mistake that needs to be corrected feel free to open an issue, leave a comment under the post or open a pull request.