Skip to content

visualengineers/smallloggingserver

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Small Logging Server

This server is based on Node.js app using Express 4. It is intended to be hosted on the Heroku platform.

Documentation

For more information about using Node.js on Heroku, see these Dev Center articles:

Development

Deploy app

Initial creation of app (needed once to create a new Heroku app):

$ heroku create
$ git push heroku main
$ heroku open

Deploy to Heroku.

Further updates like this:

git add .
git commit -m "update"
git push heroku main
heroku ps:scale web=0    # scale down
heroku ps:scale web=1    # scale up
heroku pg:psql           # edit database

Develop App

Make sure you have Node.js and the Heroku CLI installed. You should create a local .env file to set development mode:

$ heroku config:get ENV -s  >> .env

Edit .env file and set ENV=development to develop locally. Add the address to your local PostgresSQL database LOCAL_DB=postgresql://localhost:5432/kammer. You can now log from any app running on http://localhost:4200.

$ npm install
$ npm start
$ heroko local

Your app should now be running on localhost:5000.

Usage

Routes

  • GET '/' The app has one main route to display information.
  • GET '/db' Displays information about log entries
  • GET /export Exports logging data as CSV file
  • GET /cool See for yourself
  • POST /log Provide logging information via JSON

About

A small NodeJS logging server for use on Heroku

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 17