Skip to content
This repository was archived by the owner on Jun 27, 2019. It is now read-only.

Commit 322d3ee

Browse files
Standardise ReadMe.md
1 parent e7c2d4d commit 322d3ee

File tree

1 file changed

+7
-176
lines changed

1 file changed

+7
-176
lines changed

README.md

Lines changed: 7 additions & 176 deletions
Original file line numberDiff line numberDiff line change
@@ -12,182 +12,13 @@
1212
</p>
1313

1414
# Human-Connection API
15-
16-
The API for a better world. More information under [human-connection.org](https://human-connection.org)
17-
18-
> **Note:** This is only the API part of Human-Connection, you have to also checkout the [WebApp](https://github.com/Human-Connection/WebApp) which uses this API.
19-
20-
## Installation via docker
21-
22-
Make sure you have a recent version of [docker](https://www.docker.com/) and [docker-compose](https://docs.docker.com/compose/).
23-
24-
Run:
25-
```bash
26-
$ docker-compose up --build
27-
```
28-
Now, your API should be running at [http://localhost:3030](http://localhost:3030)
29-
and you can see some contributions at [http://localhost:3030/contributions](http://localhost:3030/contributions).
30-
31-
For debugging you can run:
32-
```bash
33-
$ docker-compose run --rm --service-ports api yarn run dev:debug
34-
```
35-
And debug your app with [Chrome Dev Tools](chrome://inspect).
36-
37-
### Configuration in Docker
38-
39-
Change configuration in `config/docker/local-development.json` or
40-
`config/docker/local.json` and rerun `docker-compose up --build`.
41-
42-
#### Local Staging Environment
43-
44-
To get an environment which is close to production, run the following:
45-
```sh
46-
$ docker-compose -f docker-compose.yml -f docker-compose.staging.yml up --build
47-
```
48-
49-
### Testing in Docker
50-
51-
Run the entire test suite with:
52-
```bash
53-
$ docker-compose run --rm api yarn run test
54-
```
55-
56-
If you want you can run specific tests:
57-
```bash
58-
$ docker-compose run --rm api yarn run mocha
59-
$ docker-compose run --rm api yarn run cucumber
60-
```
61-
62-
63-
## Local installation
64-
65-
> we recommand to install the project locally for the best development ease and performance
66-
67-
Getting up and running is as easy as 1, 2, 3, 4 ... 5.
68-
69-
1. Make sure you have a recent version of [NodeJS](https://nodejs.org/), [yarn](https://yarnpkg.com) and [mongoDB](https://www.mongodb.com/download-center#community) installed.
70-
71-
2. Clone this repo
72-
``` bash
73-
$ git clone https://github.com/Human-Connection/API.git
74-
```
75-
76-
3. Install your dependencies
77-
``` bash
78-
$ cd ./API
79-
$ yarn
80-
```
81-
4. Setup database seeder for local development (recommended)
82-
83-
Run
84-
```sh
85-
$ cp config/local.example.json config/local.json
86-
```
87-
88-
5. Setup local mailserver (optional)
89-
90-
> **Note:**
91-
> *You only have to start that mailserver when you want to register, reset your password or test emails in any form, it
92-
> does not affect the rest of the application.*
93-
94-
Install the [MailDev](https://github.com/djfarrelly/MailDev)
95-
server to catch all sent emails in a nice web interface.
96-
97-
``` bash
98-
# install mail dev (only has to be done once)
99-
$ yarn global add maildev
100-
101-
# start the server, it will output the web url
102-
# which normally is http://localhost:1080
103-
$ maildev
104-
```
105-
106-
You could also insert your smtp credentials into the local.json but that is not recommended as all emails would be sent
107-
to the given addresses which should not happen in development.
108-
109-
6. Start server
110-
111-
You don't have a background process running for mongodb?
112-
Just open another terminal and run:
113-
114-
```bash
115-
# open up another terminal and run:
116-
$ yarn run mongo
117-
# or if you are on windows, run:
118-
$ yarn run mongo:win
119-
```
120-
> ##### IMPORTANT for Windows users:
121-
> - make sure you have mongo bin directory added to your PATH
122-
123-
Start the API server with the following commands:
124-
``` bash
125-
$ yarn dev
126-
127-
# without hot reload
128-
$ yarn start
129-
# you can customize the environment like this:
130-
$ NODE_ENV=production yarn start
131-
```
132-
133-
134-
Now, your API should be running at [http://localhost:3030](http://localhost:3030).
135-
If you seeded your database, you will see some contributions at [http://localhost:3030/contributions](http://localhost:3030/contributions).
136-
137-
138-
### Local Configuration
139-
140-
You can override any default configuration in `config/local.json`. You can find
141-
a list of availabe defaults in `config/default.json`.
142-
See [node-config documentation](https://github.com/lorenwest/node-config/wiki/Configuration-Files)
143-
for details.
144-
145-
E.g. if you want to access the server from your mobile over WiFi, you should
146-
replace `localhost` in your settings with your IP address in the local network:
147-
```json
148-
{
149-
"host": "192.168.188.22",
150-
"baseURL": "http://192.168.188.22:3030",
151-
"frontURL": "http://192.168.188.22:3000"
152-
}
153-
154-
```
155-
156-
### Local Testing
157-
158-
Run the entire test suite with:
159-
```bash
160-
$ yarn run test
161-
```
162-
163-
If you want you can run specific tests:
164-
```bash
165-
$ yarn run mocha
166-
$ yarn run cucumber
167-
```
168-
169-
170-
## Scaffolding
171-
172-
Feathers has a powerful command line interface. Here are a few things it can do:
173-
174-
``` bash
175-
$ yarn global add feathers-cli # Install Feathers CLI
176-
177-
$ feathers generate service # Generate a new Service
178-
$ feathers generate hook # Generate a new Hook
179-
$ feathers generate model # Generate a new Model
180-
$ feathers help # Show all commands
181-
```
15+
This is the backend of HC.<br />
16+
It uses the FeathersJS, NodeJS, yarn and mongoDB.<br />
18217

18318
## Help
19+
The HC platform and its setup is documented in our [gitbook](https://www.gitbook.com/book/human-connection/documentation/) (work in progress).<br />
20+
You can get help here too: https://discord.gg/mVmjvNF<br />
18421

185-
For more information on all the framework related things visit [docs.feathersjs.com](http://docs.feathersjs.com).
186-
187-
The HC platform is documented in our [gitbook](https://www.gitbook.com/book/human-connection/documentation/) (work in progress).
188-
189-
## License
190-
191-
Copyright (c) 2018 [Human-Connection.org](https://human-connection.org)
192-
193-
Licensed under the [MIT](https://github.com/Human-Connection/WebApp/blob/develop/LICENSE.md) license.
22+
## License
23+
Copyright (c) 2018 [Human-Connection.org](https://human-connection.org)<br />
24+
Licensed under the [MIT](https://github.com/Human-Connection/WebApp/blob/develop/LICENSE.md) license.<br />

0 commit comments

Comments
 (0)