Here are the instructions for installing the crowdsourcing demo on the www.let.rug.nl web server.
You can't build the application on the web server, because it is missing the right tools. You must build it somewhere else, and then upload the compiled application to the web platform.
This should work on any machine with a x86_64 GNU/Linux architecture (amd64). To check this, run:
uname -m -o
You need gcc
, make
, and the Go compiler.
To check, run:
make --version gcc --version go version
Everywhere you see code like this
you need to replace it with your own text.
Choose a directory name for your project, and download the software to that directory:
git clone --depth 1 https://github.com/pebbe/crowdsourcing project
Go to the bin
subdirectory:
cd project/bin
Create the file Makefile.cfg
with the following content.
You can leave off /path/to/
if the Go program is in your PATH.
GO = /path/to/go OPTS = -v -ldflags="-extldflags=-static" -tags sqlite_omit_load_extension
Copy the file config.go.example
to config.go
, open it with a text editor, and
change the values of the four constants below. Change the values
to match the
bold value
as shown, but replace the
dark part
with your own values.
cBaseUrl = "https://www.let.rug.nl/user/project/" cMailName = "My Crowdsourcing" cMailFrom = "me@my.domain" cSmtpServ = "smtp.rug.nl:25"
Compile the program:
make
There should be no errors, but you may get one warning you can ignore:
warning: Using 'getaddrinfo' in statically linked applications ...
Go to the db
subdirectory, and copy the example questions:
cd ../db cp questions.csv.example questions.csv
Build the database:
make
Upload everything to the web platform.
You can now test your installation by visiting
https://www.let.rug.nl/user/project/
The next step is to change the demo survey into your own survey. To do this, read the instructions at https://github.com/pebbe/crowdsourcing/blob/master/CONFIG.md.
If you have an old version of Go (1.10 or older), you will get errors when running make
like these:
... cannot find package "github.com/dchest/authcookie" ... ... cannot find package "github.com/mattn/go-sqlite3" ...
You can fix this by running:
go get github.com/dchest/authcookie go get github.com/mattn/go-sqlite3