1
0
mirror of https://github.com/redis/node-redis.git synced 2025-08-07 13:22:56 +03:00

Add Redis.io code examples

- Add set & get example
- Use bash script to test doc tests
- Add package.json to doctests
- Add search-quickstart
This commit is contained in:
Igor Malinovskiy
2023-04-10 17:42:53 +02:00
parent 5c835d1a59
commit caaca48ca1
6 changed files with 365 additions and 0 deletions

15
doctests/run_examples.sh Executable file
View File

@@ -0,0 +1,15 @@
#!/bin/sh
basepath=`readlink -f $1`
if [ $? -ne 0 ]; then
basepath=`readlink -f $(dirname $0)`
fi
echo "No path specified, using ${basepath}"
set -e
cd ${basepath}
for i in `ls ${basepath}/*.js`; do
redis-cli flushdb
node $i
done