Skip to content

Commit 1f7bf8d

Browse files
authored
Merge pull request #359 from sushantdhiman/docs-update
Docs update
2 parents e476062 + 179a43f commit 1f7bf8d

File tree

3 files changed

+80
-40
lines changed

3 files changed

+80
-40
lines changed

Contributing.md

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
# Contributing Guidelines
2+
3+
## Introduction
4+
5+
Contributions are always welcomed. You can help `node-mysql2` community in various ways. Here are our major priorities, listed in order of importance.
6+
7+
- `node-mysql` API incompatibility fixes
8+
- Documentation
9+
- Adding tests or improving existing ones
10+
- Improving benchmarks
11+
- Bug Fixes
12+
- TODO from source
13+
- Performance improvements
14+
- Add Features
15+
16+
## Security Issues
17+
18+
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.
19+
20+
**Contact**
21+
22+
- Andrey Sidorov, [email protected]
23+
24+
## New Features
25+
26+
Its better to discuss an API before actually start implementing it. You can open an issue on Github. We can discuss design of API and implementation ideas.
27+
28+
## Development
29+
30+
We assume you already have these tools installed on your system
31+
- MySQL Server
32+
- Node.JS
33+
34+
As `node-mysql2` is purely JS based you can develop it on Linux, Mac or Windows. Please follow these steps
35+
36+
```bash
37+
# clone node-mysql2
38+
git clone https://github.com/sidorares/node-mysql2.git
39+
40+
cd /path/to/node-mysql2
41+
42+
# install node modules
43+
npm install
44+
```
45+
46+
### Running Tests
47+
48+
Running tests requires MySQL server and an empty database. You can run `bash` command given below to create `test` database
49+
50+
```bash
51+
# assuming MySQL have a user root with no password
52+
echo "CREATE DATABASE test;" | mysql -uroot
53+
```
54+
55+
```sh
56+
# Run once to setup the local environment variables.
57+
export CI=1;
58+
export MYSQL_HOST='127.0.0.1';
59+
export MYSQL_USER='root';
60+
export MYSQL_PASSWORD='root';
61+
export MYSQL_DATABASE='test';
62+
63+
# If test user has no password, unset the `CI` variable.
64+
65+
# Run the test suite
66+
npm run test
67+
```
68+
69+
Use `FILTER` environment variable to run a subset of tests with matching names, e.g.
70+
71+
```sh
72+
FILTER='test-timestamp' npm run test
73+
```

License

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2013 Andrey Sidorov ([email protected]) and contributors
1+
Copyright (c) 2016 Andrey Sidorov ([email protected]) and contributors
22

33
Permission is hereby granted, free of charge, to any person obtaining a copy
44
of this software and associated documentation files (the "Software"), to deal

README.md

Lines changed: 6 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
[![Linux Build][travis-image]][travis-url]
77
[![Windows Build][appveyor-image]][appveyor-url]
88

9-
Mysql client for node.js. Written in native JavaScript and aims to be mostly api compatible with [node-mysql](https://github.com/felixge/node-mysql)
9+
MySql client for node.js. Written in native JavaScript and aims to be mostly api compatible with [node-mysql](https://github.com/felixge/node-mysql)
1010

1111
[![NPM](https://nodei.co/npm/mysql2.png?downloads=true&stars=true)](https://nodei.co/npm/mysql2/)
1212
[![NPM](https://nodei.co/npm-dl/mysql2.png?months=6)](https://nodei.co/npm/mysql2/)
@@ -15,11 +15,11 @@ Mysql client for node.js. Written in native JavaScript and aims to be mostly api
1515

1616
In addition to client-side query/escape and connection pooling
1717

18-
- [fast](https://gist.github.com/sidorares/ffe9ee9c423f763e3b6b)
18+
- [Fast](https://gist.github.com/sidorares/ffe9ee9c423f763e3b6b)
1919
- MySQL server API for proxies and mocks
2020
- SSL and compression
21-
- prepared statements
22-
- binlog protocol client
21+
- Prepared statements
22+
- Binary log protocol client
2323

2424
## Documentation
2525

@@ -391,30 +391,6 @@ In addition special events are emitted for [commands](https://dev.mysql.com/doc/
391391
* **field_list**(table: string, fields: string) - Default: return ER_WARN_DEPRECATED_SYNTAX
392392
* **ping**() - Default: return OK
393393

394-
## Running Tests
395-
396-
Running the tests requires MySQL server and an empty database.
397-
398-
```sh
399-
# Run once to setup the local environment variables.
400-
export CI=1;
401-
export MYSQL_HOST='127.0.0.1';
402-
export MYSQL_USER='root';
403-
export MYSQL_PASSWORD='root';
404-
export MYSQL_DATABASE='test';
405-
406-
# If test user has no password, unset the `CI` variable.
407-
408-
# Run the test suite
409-
npm run test
410-
```
411-
412-
Use `FILTER` environment variable to run a subset of tests with matching names, e.g.
413-
414-
```sh
415-
FILTER='test-timestamp' npm run test
416-
```
417-
418394
## License
419395

420396
MIT
@@ -451,17 +427,8 @@ FILTER='test-timestamp' npm run test
451427

452428
## Contributing
453429

454-
Feel free to create pull requests.
455-
TODO in order of importance:
456-
457-
- node-mysql api incompatibility fixes
458-
- documentation
459-
- tests
460-
- benchmarks
461-
- bug fixes
462-
- TODOs in source code
463-
- performance improvements
464-
- features
430+
Want to improve something in `node-mysql2`. Please check [Contributing.md](https://github.com/sidorares/node-mysql2/blob/master/Contributing.md) for detailed instruction on how to get started.
431+
465432

466433
[npm-image]: https://img.shields.io/npm/v/mysql2.svg
467434
[npm-url]: https://npmjs.org/package/mysql2

0 commit comments

Comments
 (0)