Skip to content
This repository has been archived by the owner on Jan 20, 2020. It is now read-only.

Commit

Permalink
Readme updates
Browse files Browse the repository at this point in the history
  • Loading branch information
Luciano Nooijen committed Dec 6, 2018
1 parent 912ab3c commit 3c84e05
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ To use the NodeJS Blog module, first, import the package

```js
const nodeBlog = require('nodejs-blog');
const { authors, auth, users, articles } = require('nodejs-blog');
const { authors, auth, users, categories, articles } = require('nodejs-blog');
```

to start using the package, create a new instance of the NodeBlog class
Expand Down Expand Up @@ -76,20 +76,30 @@ users.add(blog, userObject)
users.modify(blog, id, modifiedData)
users.delete(blog, id)

categories.list(blog)
categories.get(blog, id)
categories.add(blog, categoryObject)
categories.modify(blog, id, modifiedData)
categories.delete(blog, id)

articles.list(blog)
articles.get(blog, id)
articles.add(blog, articleObject)
articles.modify(blog, id, modifiedData)
// articles.modify(blog, id, modifiedData) // not available yet
articles.delete(blog, id)
```

We recommend creating a single file that will create the NodeBlog instance, and `export` this instance, and `import` in all other files where you want to use NodeJS Blog.

For security reasons we recommend using environment variables for loading the configuration. This is also in compliance with the [12 factor app Config guidelines](https://12factor.net/config)

Note: NodeJS blog was made to be used with PostgreSQL, but it should(/could) also be compatible with other databases, as it uses KnexJS under the hood.
Note: NodeJS blog was made to be used with PostgreSQL, but it should(/could) also be compatible with other databases, as it uses [KnexJS](https://knexjs.org) under the hood.

*A demo application is currently in development*

## Running the API as a standalone service (still in development, might not work 100%)

## Running the API as a standalone service
First clone the repository and `cd` into the directory.

To run NodeJS Blog as a standalone service, run `cp .env.example .env` to create the `.env` file.

Expand Down

0 comments on commit 3c84e05

Please sign in to comment.