Skip to content

Commit

Permalink
Updated README
Browse files Browse the repository at this point in the history
  • Loading branch information
MrKriegler committed Dec 29, 2018
1 parent 96cb5e5 commit dca262f
Show file tree
Hide file tree
Showing 5 changed files with 207 additions and 32 deletions.
7 changes: 0 additions & 7 deletions Dockerfile

This file was deleted.

41 changes: 32 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,39 @@

Open source Task management software for service based work. i.e. Plumbers, Steal work, etc

## Code Samples
### Directory layout
.
├── dist # Compiled files
├── db_migrations # To be run for db setup
├── lib # Library files
├── src # Source files
├── tests # Automated tests
├── tools # Tools and utilities
└── README.md

Coming soon
## Installation

Installation is simple just run

```
npm i
```

To run the server locally use

```
npm run
```

## Running Tests

To run the e2e tests simply run

```
npm run tests
```

You can install [restlet_client](https://restlet.com/modules/client/) and import the `restclient.json` for the API collection.

## Current endpoints

Expand Down Expand Up @@ -41,10 +71,3 @@ Delete Task (soft delete)
DELETE /api/v1/tasks/id:task:1
```


## Installation
```
npm i
npm run
npm run tests
```
3 changes: 1 addition & 2 deletions db_migrations/init_collections.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { db } from "mongodb";

use matilda;
db.sequences.insert({
'_id': 'task_id',
'nextIndex': 0
Expand Down
23 changes: 9 additions & 14 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,13 @@
version: "2"
services:
app:
container_name: app
restart: always
build: .
ports:
- "3000:3000"
links:
- mongo
command: "npm start"
mongo:
container_name: mongo
image: mongo
mongodb:
image: mongo:latest
container_name: "mongodb"
environment:
- MONGO_DATA_DIR=/data/db
- MONGO_LOG_DIR=/dev/null
volumes:
- ./data:/data/db
- ./data/db:/data/db
ports:
- "27017:27017"
- 27017:27017
command: mongod --smallfiles --logpath=/dev/null # --quiet
165 changes: 165 additions & 0 deletions restclient.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,165 @@
{
"front-version": "2.19.1",
"version": 3,
"nodes": [
{
"type": "Project",
"id": "7b764e89-04c3-429d-96e1-38c3e8b73a92",
"lastModified": "2018-12-29T09:55:02.067+02:00",
"name": "Matilda"
},
{
"type": "Request",
"method": {
"link": "http://tools.ietf.org/html/rfc7231#section-4.3.1",
"name": "GET"
},
"body": {
"formBody": {
"overrideContentType": true,
"encoding": "application/x-www-form-urlencoded",
"items": []
},
"bodyType": "Text",
"autoSetLength": true
},
"headersType": "Form",
"uri": {
"query": {
"delimiter": "&",
"items": []
},
"scheme": {
"name": "http",
"version": "V11"
},
"host": "localhost:3000",
"path": "/api/v1/tasks/id:task:1"
},
"id": "f284239c-5277-42b0-878b-a8376c7137c5",
"lastModified": "2018-12-29T09:55:02.067+02:00",
"name": "GET http://localhost:3000/api/v1/tasks/id:task:1",
"headers": [],
"metaInfo": {
"ownerId": "google-oauth2|106915669040165062216"
},
"parentId": "7b764e89-04c3-429d-96e1-38c3e8b73a92"
},
{
"uriEditor": true,
"type": "Request",
"method": {
"requestBody": true,
"link": "http://tools.ietf.org/html/rfc7231#section-4.3.3",
"name": "POST"
},
"body": {
"formBody": {
"overrideContentType": true,
"encoding": "application/x-www-form-urlencoded",
"items": []
},
"bodyType": "Text",
"autoSetLength": true,
"textBody": "{\n \"type\": \"installation\",\n \"status\": \"new\",\n \"detail\": \"Test task\",\n \"version\": 1,\n \"enabled\": true \n}"
},
"headersType": "Form",
"uri": {
"query": {
"delimiter": "&",
"items": []
},
"scheme": {
"name": "http",
"version": "V11"
},
"host": "localhost:3000",
"path": "/api/v1/tasks"
},
"id": "3eea10ce-7024-40b7-9ea0-9d56ff395de6",
"lastModified": "2018-12-22T10:24:51.646+02:00",
"name": "POST http://localhost:3000/api/v1/tasks",
"headers": [
{
"name": "Authorization",
"value": "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJub2VsQG1hbmFnZXIuY29tIiwianRpIjoiYTBmYjAxNjctZjZjYi00NmViLTgwYWUtMzZkNjA3MDZkZDg4IiwiaHR0cDovL3NjaGVtYXMueG1sc29hcC5vcmcvd3MvMjAwNS8wNS9pZGVudGl0eS9jbGFpbXMvbmFtZWlkZW50aWZpZXIiOiJmMTIzMjI5OS1hZjBiLTQwZTItODA4Yy04MGNiZDYzZDExYzEiLCJodHRwOi8vc2NoZW1hcy5taWNyb3NvZnQuY29tL3dzLzIwMDgvMDYvaWRlbnRpdHkvY2xhaW1zL3JvbGUiOiJhZG1pbiIsImV4cCI6MTUzNTYwOTUwNywiaXNzIjoibG9jYWxob3N0OjQ0MzMxIiwiYXVkIjoibG9jYWxob3N0OjQ0MzMxIn0._KwklIjp48k6wNLN64W9n6IKS47Nj1vekN7y4hg2Q7Q"
},
{
"name": "X-Pagination-Page",
"value": "1"
},
{
"name": "X-Pagination-Limit",
"value": "10"
},
{
"enabled": true,
"name": "Content-Type",
"value": "application/json"
}
],
"metaInfo": {
"ownerId": "google-oauth2|106915669040165062216"
},
"parentId": "7b764e89-04c3-429d-96e1-38c3e8b73a92"
},
{
"uriEditor": true,
"type": "Request",
"method": {
"requestBody": true,
"link": "http://tools.ietf.org/html/rfc7231#section-4.3.4",
"name": "PUT"
},
"body": {
"formBody": {
"overrideContentType": true,
"encoding": "application/x-www-form-urlencoded",
"items": []
},
"bodyType": "Text",
"autoSetLength": true,
"textBody": "{\n \"status\": \"new\"\n}"
},
"headersType": "Form",
"uri": {
"query": {
"delimiter": "&",
"items": []
},
"scheme": {
"name": "http",
"version": "V11"
},
"host": "localhost:3000",
"path": "/api/v1/tasks/id:task:1"
},
"id": "3d7aef01-15c9-48cb-b817-544d75029be1",
"lastModified": "2018-12-22T15:00:19.979+02:00",
"name": "PUT http://localhost:3000/api/v1/tasks/id:task:1",
"headers": [
{
"name": "Authorization",
"value": "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJub2VsQG1hbmFnZXIuY29tIiwianRpIjoiYTBmYjAxNjctZjZjYi00NmViLTgwYWUtMzZkNjA3MDZkZDg4IiwiaHR0cDovL3NjaGVtYXMueG1sc29hcC5vcmcvd3MvMjAwNS8wNS9pZGVudGl0eS9jbGFpbXMvbmFtZWlkZW50aWZpZXIiOiJmMTIzMjI5OS1hZjBiLTQwZTItODA4Yy04MGNiZDYzZDExYzEiLCJodHRwOi8vc2NoZW1hcy5taWNyb3NvZnQuY29tL3dzLzIwMDgvMDYvaWRlbnRpdHkvY2xhaW1zL3JvbGUiOiJhZG1pbiIsImV4cCI6MTUzNTYwOTUwNywiaXNzIjoibG9jYWxob3N0OjQ0MzMxIiwiYXVkIjoibG9jYWxob3N0OjQ0MzMxIn0._KwklIjp48k6wNLN64W9n6IKS47Nj1vekN7y4hg2Q7Q"
},
{
"name": "X-Pagination-Page",
"value": "1"
},
{
"name": "X-Pagination-Limit",
"value": "10"
},
{
"enabled": true,
"name": "Content-Type",
"value": "application/json"
}
],
"metaInfo": {
"ownerId": "google-oauth2|106915669040165062216"
},
"parentId": "7b764e89-04c3-429d-96e1-38c3e8b73a92"
}
]
}

0 comments on commit dca262f

Please sign in to comment.