couchdb-connection
Advanced tools
Comparing version 1.0.3 to 1.0.4
{ | ||
"name": "couchdb-connection", | ||
"bin": "./index.js", | ||
"version": "1.0.3", | ||
"version": "1.0.4", | ||
"description": "", | ||
@@ -6,0 +6,0 @@ "main": "index.js", |
@@ -1,18 +0,15 @@ | ||
TO install please run npm i Couchdb-connection -g. | ||
To install run npm i couchdb-connection -g | ||
Once installed do the the desired directory and run couchdb-connection | ||
There will be a new folder 'couchdb-connection' with a file.js | ||
Couchdb-connection is a package which makes use use of couchdb, express and nano. | ||
#Configuration# | ||
In the new directory the file.js will make a web server that runs on http://localhost:3001 created by express. | ||
Change the user and password to your configured couchdb credentials | ||
Then change the const db where it says 'Database Name' | ||
If you want to change to port where the web server listens change the const port | ||
Nano is used to talk to the database and perform actions such as CRUD actions. | ||
To run the file.js you can use 'node file.js' in the terminal just remember to be in the right directory | ||
To run the file 'cd Couchdb-connection and run node file.js or if you have nodemon then nodemon file.js'. | ||
if you want to change the port the server listens to then change const port to the desired number. | ||
And for the Coudb database change the const db to the name of your database. | ||
Express docs - https://www.npmjs.com/package/express | ||
Nano docs - https://www.npmjs.com/package/nano | ||
Nano docs - https://www.npmjs.com/package/nano |
1837
15