Update README.md
This commit is contained in:
31
README.md
31
README.md
@@ -1,3 +1,4 @@
|
|||||||
|
|
||||||
# kno-logic-api
|
# kno-logic-api
|
||||||
<p align="center">
|
<p align="center">
|
||||||
<img src="https://imgur.com/P2nDq7b.png" width="180">
|
<img src="https://imgur.com/P2nDq7b.png" width="180">
|
||||||
@@ -5,10 +6,10 @@
|
|||||||
|
|
||||||
Kno-logic is a mobile learning platform with a short number of curated articles added daily for lifelong learners. This API was built with NodeJS and Express, and uses MongoDB as a database.
|
Kno-logic is a mobile learning platform with a short number of curated articles added daily for lifelong learners. This API was built with NodeJS and Express, and uses MongoDB as a database.
|
||||||
|
|
||||||
## Developing locally
|
## Running Application
|
||||||
If you would like to run the application you will need:
|
If you would like to run the application you will need:
|
||||||
- NodeJS 14
|
- NodeJS 14
|
||||||
- MongoDB Community
|
- MongoDB Community Server
|
||||||
|
|
||||||
Install the latest version of [`Node.js`](https://nodejs.org/en/).
|
Install the latest version of [`Node.js`](https://nodejs.org/en/).
|
||||||
|
|
||||||
@@ -28,3 +29,29 @@ nodemon
|
|||||||
# running the server
|
# running the server
|
||||||
node .
|
node .
|
||||||
```
|
```
|
||||||
|
## Email Templates
|
||||||
|
Emails are stored in the [`templates`](https://github.com/jslightham/kno-logic-api/tree/main/templates) directory. Any text files in the [`templates`](https://github.com/jslightham/kno-logic-api/tree/main/templates) directory will be added to the MongoDB message collection.
|
||||||
|
|
||||||
|
Any portion of the message can be replaced when sending the email. The convention used in all default email templates is `%replace_string%`. The replace string does not matter since when calling the sendMail function, replacements is an array of data with the form `{from: "%replace_string%", to: "Username"}`.
|
||||||
|
|
||||||
|
## Configuration
|
||||||
|
Configuration for the application is done in the [`config.js`](https://github.com/jslightham/kno-logic-api/blob/main/config.js) file.
|
||||||
|
|
||||||
|
Example configuration:
|
||||||
|
```
|
||||||
|
var config = {};
|
||||||
|
|
||||||
|
// Mailer settings
|
||||||
|
config.mail = {};
|
||||||
|
config.mail.host = "localhost";
|
||||||
|
config.mail.port = "465";
|
||||||
|
config.mail.secure = false;
|
||||||
|
config.mail.user = "username";
|
||||||
|
config.mail.pass = "pass";
|
||||||
|
config.mail.from = "<noreply@knologic.com>"
|
||||||
|
|
||||||
|
// Session purge settings
|
||||||
|
config.maxSessionLength = 30;
|
||||||
|
|
||||||
|
module.exports = config;
|
||||||
|
```
|
||||||
|
|||||||
Reference in New Issue
Block a user