aiiinotate 0.2.6 → 0.2.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +44 -21
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -8,23 +8,16 @@ aiiinotate is a fast and lightweight annotation server for IIIF. It relies on `n
|
|
|
8
8
|
|
|
9
9
|
### Install
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
1. **Install mongodb**.
|
|
12
|
+
- see [dev installation script for help](./scripts/setup_mongodb.sh)
|
|
13
|
+
- checkout the [official installation guide](https://www.mongodb.com/docs/manual/tutorial/install-mongodb-on-ubuntu/#std-label-install-mdb-community-ubuntu)
|
|
12
14
|
|
|
15
|
+
2. **Install aiiinotate**
|
|
13
16
|
```bash
|
|
14
17
|
npm install aiiinotate
|
|
15
18
|
```
|
|
16
19
|
|
|
17
|
-
###
|
|
18
|
-
|
|
19
|
-
The base command is:
|
|
20
|
-
|
|
21
|
-
```bash
|
|
22
|
-
aiiinotate --env <path-to-your-env-file> -- <command>
|
|
23
|
-
```
|
|
24
|
-
|
|
25
|
-
It will give full access to the CLI interface of Aiiinotate.
|
|
26
|
-
|
|
27
|
-
#### Run the app
|
|
20
|
+
### Setup the app
|
|
28
21
|
|
|
29
22
|
0. **Setup your `.env`** file after [.env.template](./config/.env.template).
|
|
30
23
|
|
|
@@ -40,7 +33,11 @@ sudo systemctl start mongod
|
|
|
40
33
|
aiiinotate --env <path-to-your-env-file> -- migrate apply
|
|
41
34
|
```
|
|
42
35
|
|
|
43
|
-
|
|
36
|
+
### Usage
|
|
37
|
+
|
|
38
|
+
All commands are accessible through a CLI (./src/cli).
|
|
39
|
+
|
|
40
|
+
#### Run the app
|
|
44
41
|
|
|
45
42
|
```bash
|
|
46
43
|
aiiinotate --env <path-to-your-env-file> -- serve prod
|
|
@@ -48,9 +45,17 @@ aiiinotate --env <path-to-your-env-file> -- serve prod
|
|
|
48
45
|
aiiinotate --env <path-to-your-env-file> -- serve dev
|
|
49
46
|
```
|
|
50
47
|
|
|
51
|
-
####
|
|
48
|
+
#### Run administration commands
|
|
49
|
+
|
|
50
|
+
The base command is:
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
aiiinotate --env <path-to-your-env-file> -- <command>
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
It will give full access to the CLI interface of Aiiinotate. Run `aiiinotate --help` for more info.
|
|
52
57
|
|
|
53
|
-
TODO
|
|
58
|
+
1. Import data - TODO
|
|
54
59
|
|
|
55
60
|
---
|
|
56
61
|
|
|
@@ -59,12 +64,22 @@ TODO
|
|
|
59
64
|
### Install
|
|
60
65
|
|
|
61
66
|
```bash
|
|
62
|
-
|
|
67
|
+
# clone the repo
|
|
68
|
+
git clone git@github.com:Aikon-platform/aiiinotate.git
|
|
69
|
+
|
|
70
|
+
# move inside it
|
|
71
|
+
cd aiiinotate
|
|
72
|
+
|
|
73
|
+
# install mongodb
|
|
74
|
+
bash ./scripts/setup_mongodb.sh
|
|
75
|
+
|
|
76
|
+
# install dependencies
|
|
77
|
+
npm i
|
|
63
78
|
```
|
|
64
79
|
|
|
65
|
-
###
|
|
80
|
+
### Setup
|
|
66
81
|
|
|
67
|
-
|
|
82
|
+
After installing, some setup must be done
|
|
68
83
|
|
|
69
84
|
0. **Setup your `.env`** file after [.env.template](./config/.env.template) and place it at `./config/.env`.
|
|
70
85
|
|
|
@@ -74,7 +89,15 @@ bash setup.sh
|
|
|
74
89
|
sudo systemctl start mongod
|
|
75
90
|
```
|
|
76
91
|
|
|
77
|
-
|
|
92
|
+
2. **Configure the database**
|
|
93
|
+
|
|
94
|
+
```bash
|
|
95
|
+
npm run migrate apply
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
### Usage
|
|
99
|
+
|
|
100
|
+
Remember to have your `mongodb` service running: `sudo systemctl start mongod` !
|
|
78
101
|
|
|
79
102
|
- **Start the app**
|
|
80
103
|
|
|
@@ -98,7 +121,7 @@ npm cli
|
|
|
98
121
|
|
|
99
122
|
```bash
|
|
100
123
|
# create a new migration. NOTE: the `--` is necessary !
|
|
101
|
-
npm run migrate make -- --
|
|
124
|
+
npm run migrate make -- --migration-name <your migration name>
|
|
102
125
|
|
|
103
126
|
# apply all pending migrations
|
|
104
127
|
npm run migrate apply
|
|
@@ -107,7 +130,7 @@ npm run migrate apply
|
|
|
107
130
|
npm run migrate revert
|
|
108
131
|
|
|
109
132
|
# revert all migrations
|
|
110
|
-
npm run migrate revert-all
|
|
133
|
+
npm run migrate revert-all
|
|
111
134
|
```
|
|
112
135
|
|
|
113
136
|
---
|