You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jan 20, 2020. It is now read-only.
to start using the package, create a new instance of the NodeBlog class
@@ -76,20 +76,30 @@ users.add(blog, userObject)
76
76
users.modify(blog, id, modifiedData)
77
77
users.delete(blog, id)
78
78
79
+
categories.list(blog)
80
+
categories.get(blog, id)
81
+
categories.add(blog, categoryObject)
82
+
categories.modify(blog, id, modifiedData)
83
+
categories.delete(blog, id)
84
+
79
85
articles.list(blog)
80
86
articles.get(blog, id)
81
87
articles.add(blog, articleObject)
82
-
articles.modify(blog, id, modifiedData)
88
+
//articles.modify(blog, id, modifiedData) // not available yet
83
89
articles.delete(blog, id)
84
90
```
85
91
86
92
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.
87
93
88
94
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)
89
95
90
-
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.
96
+
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.
97
+
98
+
*A demo application is currently in development*
99
+
100
+
## Running the API as a standalone service (still in development, might not work 100%)
91
101
92
-
## Running the API as a standalone service
102
+
First clone the repository and `cd` into the directory.
93
103
94
104
To run NodeJS Blog as a standalone service, run `cp .env.example .env` to create the `.env` file.
0 commit comments