diff --git a/README.md b/README.md
index 17909ba..92de6d0 100644
--- a/README.md
+++ b/README.md
@@ -1,14 +1,16 @@
# padArchiver
Tool to store a pad (from the link) into IPFS and Git.
-## webServer
+All the necessary files are in the /build directory.
+
+## 1.- webServer
This is a webserver that automatically generates a web from the pads directories and files stored.
-To run:
+To run, inside 'build' directory:
```
./webServer
```
-## listPadsImporter
+## 2.- listPadsImporter
This is to import all pads from the json file 'list.json'.
Just need to edit the json file, for example:
```json
@@ -33,12 +35,12 @@ Just need to edit the json file, for example:
]
}
```
-And then execute the importer:
+To run, inside 'build' directory:
```
./importFromList
```
-## apiServer
+## 3.- apiServer
This is an API to run in localhost.
#### Run
@@ -56,7 +58,7 @@ To run using the compiled binary:
}
```
-- Execute the API server:
+- Execute the API server, inside the directory 'build':
```
> ./padArchiver-APIserver
```
@@ -108,8 +110,8 @@ this returns:
```
The IPFS hash is also added to the first line of the document, before adding the document to Git.
-## cli
-To run the CLI, just need to run:
+## 4.- cli
+To run the CLI, just need to run inside the directory 'build':
```
./padArchiver-cli
```
diff --git a/apiServer/apiServer b/apiServer/apiServer
index 581a087..653fb4b 100755
Binary files a/apiServer/apiServer and b/apiServer/apiServer differ
diff --git a/apiServer/main.go b/apiServer/main.go
index 37ae167..6398a75 100644
--- a/apiServer/main.go
+++ b/apiServer/main.go
@@ -89,7 +89,7 @@ func PostStorePad(w http.ResponseWriter, r *http.Request) {
}
defer r.Body.Close()
- ipfsHash, err := repo.StorePad(pad.Link, pad.Dir, pad.Title)
+ ipfsHash, err := repo.StorePad(pad.Link, pad.Dir, pad.Title, true)
if err != nil {
http.Error(w, "error storing pad", http.StatusConflict)
}
diff --git a/build.sh b/build.sh
new file mode 100644
index 0000000..69e5a8a
--- /dev/null
+++ b/build.sh
@@ -0,0 +1,31 @@
+echo "starting build process"
+rm -rf build
+mkdir build
+
+cd webServer
+echo "building webServer"
+go build
+cp webServer ../build
+cp -r templates ../build
+cd ..
+
+cd listPadsImporter
+echo "building listPadsImporter"
+go build
+cp listPadsImporter ../build
+cd ..
+
+cd apiServer
+echo "building apiServer"
+go build
+cp apiServer ../build
+cd ..
+
+
+cd cli
+echo "building cli"
+go build
+cp cli ../build
+cd ..
+
+echo "build process complete, all the necessary files are in the /build directory"
diff --git a/build/apiServer b/build/apiServer
new file mode 100755
index 0000000..653fb4b
Binary files /dev/null and b/build/apiServer differ
diff --git a/build/cli b/build/cli
new file mode 100755
index 0000000..8829e45
Binary files /dev/null and b/build/cli differ
diff --git a/build/listPadsImporter b/build/listPadsImporter
new file mode 100755
index 0000000..13459ac
Binary files /dev/null and b/build/listPadsImporter differ
diff --git a/build/templates/menuTemplate.html b/build/templates/menuTemplate.html
new file mode 100644
index 0000000..05f1567
--- /dev/null
+++ b/build/templates/menuTemplate.html
@@ -0,0 +1,18 @@
+