We will open Start.cmd
in the Notepad application to learn how RavenDB would be launched.
In Windows Explorer, go to
C:\RavenDB-Build-2375
.Select the
Start.cmd
file and open it in the Notepad application. It should look like this:
In steps 1 and 2, we opened the Start.cmd
file and took a look at its command line parameters.
The Raven.Server.exe
file is launched with two parameters --debug
and --browser
. The debug
parameter is used by developers for applications debugging purposes and the browser
parameter is used to open the Management Studio in the web browser automatically.
Before launching the RavenDB server, you might need to configure it. We can do configuration by editing the Raven.server.exe.config
file located in the Server
directory. This is a text file and can be edited and modified with the Notepad application.
There are three key-values in the appSettings section. These keys settings that you can modify to meet your needs are:
Raven.Server.exe
runs by default on port 8080. The Start.cmd
file will run the Raven.Server.exe
file with the command-line parameter –browser
. This will automatically open the Management Studio in the web browser and point to this location: http://hostname:port/raven/studio.html
.
Note
A few points to be noted about default values:
The
*
value assigned to theRaven/Port
indicates that RavenDB will find the first available port from 8080 and upward. By default, RavenDB server selects the 8080 TCP/IP port if it is not already in use. And once this is done that port is fixed.The path for the database directory is defined by the
Raven/DataDir
key. The use of~\
indicates to start from the RavenDB root directory, in which case the path will start from the server-based directory. The default value is:~\Database\System
.The
Raven/AnonymousAccess
key by default is set toGet
and it determines what actions an anonymous user can do. You can control the access level by setting this key to one of these values;Get
for read only,All
for read/write, andNone
allows access to authenticated users only.