forked from sidorares/node-mysql2
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3dadcfb
commit 393e94f
Showing
3 changed files
with
80 additions
and
40 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
# Contributing Guidelines | ||
|
||
## Introduction | ||
|
||
Contributions are always welcomed. You can help `node-mysql2` community in various ways. Here are our major priorities, listed in order of importance. | ||
|
||
- `node-mysql` API incompatibility fixes | ||
- Documentation | ||
- Adding tests or improving existing ones | ||
- Improving benchmarks | ||
- Bug Fixes | ||
- TODO from source | ||
- Performance improvements | ||
- Add Features | ||
|
||
## Security Issues | ||
|
||
Please contact project maintainers privately before opening a security issue on Github. It will allow us to fix the issue before attackers know about it. | ||
|
||
**Contact** | ||
|
||
- Andrey Sidorov, [email protected] | ||
|
||
## New Features | ||
|
||
Its better to discuss an API before actaully start implementing it. You can open an issue on Github. We can discuss design of API and implementation ideas. | ||
|
||
## Development | ||
|
||
We assume you already have these tools installed on your system | ||
- MySQL Server | ||
- Node.JS | ||
|
||
As `node-mysql2` is purely JS based you can develop it on Linux, Mac or Windows. Please follow these steps | ||
|
||
```bash | ||
# clone node-mysql2 | ||
git clone https://github.com/sidorares/node-mysql2.git | ||
|
||
cd /path/to/node-mysql2 | ||
|
||
# install node modules | ||
npm install | ||
``` | ||
|
||
### Running Tests | ||
|
||
Running tests requires MySQL server and an empty database. You can run `bash` command given below to create `test` database | ||
|
||
```bash | ||
# assuming MySQL have a user root with no password | ||
echo "CREATE DATABASE test;" | mysql -uroot | ||
``` | ||
|
||
```sh | ||
# Run once to setup the local environment variables. | ||
export CI=1; | ||
export MYSQL_HOST='127.0.0.1'; | ||
export MYSQL_USER='root'; | ||
export MYSQL_PASSWORD='root'; | ||
export MYSQL_DATABASE='test'; | ||
|
||
# If test user has no password, unset the `CI` variable. | ||
|
||
# Run the test suite | ||
npm run test | ||
``` | ||
|
||
Use `FILTER` environment variable to run a subset of tests with matching names, e.g. | ||
|
||
```sh | ||
FILTER='test-timestamp' npm run test | ||
``` |
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
Copyright (c) 2013 Andrey Sidorov ([email protected]) and contributors | ||
Copyright (c) 2016 Andrey Sidorov ([email protected]) and contributors | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
|
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