Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Do I need to re-make and re-install couchdb everytime I want to test a change to the source?

Tags:

erlang

couchdb

I am trying to contribute more with couchdb code, but I have really no idea how it is done the right way.

I have cloned the source from apache git repository and built it with

./configure
make && sudo make install

Then I wanted to change a file from the source called couch_httpd_show.erl

Do I need to run make && sudo make install again for every change I make to the source code and want to see how it behaves?

I am sure there's a more practical way to do it, because this approach is a bit time and patience consuming right?

like image 664
zanona Avatar asked Jul 04 '11 19:07

zanona


People also ask

How do I know if Couchdb is installed?

Step 3: Verify CouchDB Installation To quench your curiosity, run the netstat command as shown. To verify whether the installation was successful and the service is running, run the curl command below. You should get the following information about the CouchDB database which is printed in JSON format.


1 Answers

Yes, there is a shortcut.

./configure
make dev
./utils/run

This builds and runs CouchDB entirely in the current directory. Instead of running as a background daemon, CouchDB will run in the foreground and output log messages to the terminal. It uses some local directories to store stuff: ./tmp/log for logs, ./tmp/lib for databases, and (if I remember correctly) ./etc/couch/local_dev.ini for configuration.

If you run this instead:

./utils/run -i

then you will also have an interactive Erlang prompt, which you can use to help debug.

When I work on CouchDB, I run this in the shell:

make dev && ./utils/run -i

After I change some code, I press ^C, up-arrow, return.

When I joined Couchio, I was responsible for production CouchDB deployments. I asked Chris Anderson for advice about something and he said, "Sorry, ask Jan. I've been just using utils/run for years!"

like image 175
JasonSmith Avatar answered Sep 22 '22 22:09

JasonSmith