Code Monkey home page Code Monkey logo

kno-logic-api's Introduction

kno-logic-api

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.

Running Application

If you would like to run the application you will need:

  • NodeJS 14
  • MongoDB Community Server

Install the latest version of Node.js.

Install the latest version of MongoDB Community Server.

Clone the repository, and run the following:

# start database
mongod

# install dependencies
npm install

# server with hot reload (optional, requires nodemon)
nodemon

# running the server
node .

Email Templates

Emails are stored in the templates directory. Any text files in the templates directory will be added to the MongoDB message collection. The first line of the file is the subject of the email, and will be remoevd from the message body.

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"}.

Email subjects are the first line of the file, which are removed from the email body.

Configuration

Configuration for the application is done in the 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 = "<[email protected]>"

// Session purge settings
config.maxSessionLength = 30;

module.exports = config;

kno-logic-api's People

Contributors

jslightham avatar dependabot[bot] avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.