AndrewJBateman / node-koa-data

:clipboard: Node.js used with Koa instead of Express middleware, with embedded javascript (EJS) & Bootstrap to display oil well data

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

⚑ Node Koa Data

  • Node.js used with Koa instead of Express middleware, with embedded javascript (EJS) & Bootstrap to display oil well data
  • Note: to open web links in a new window use: ctrl+click on link

GitHub repo size GitHub pull requests GitHub Repo stars GitHub last commit

πŸ“„ Table of contents

πŸ“š General info

  • Koa middleware used to add routing, body-parser, JSON and EJS HTML views
  • Simple Bootstrap navbar
  • An oil well name can be added to the list - this is not stored in a database and will be lost when app is shut down.

πŸ“· Screenshots

Image

πŸ“Ά Technologies

πŸ’Ύ Setup

  • npm i to install dependencies
  • npm run dev runs app in the development mode with auto-restart.
  • Open http://localhost:5000 to view in the browser.

πŸ”§ Testing

  • N/A

πŸ’» Code Examples

  • index.js asynchronous function to render the index page in the browser root using Koa middleware
router.get("/", async (ctx) => {
  await ctx.render("index", {
    title: "Underground Injection Control Wells",
    wells: wells,
  });
});

πŸ†’ Features

  • Uses Koa which is much lighter than the usual Express middleware

πŸ“‹ Status, Testing & To-Do List

  • Status: Working
  • To-Do: Add well update and delete + database connection & other db fields such as location of well etc.

πŸ‘ Inspiration

πŸ“ License

  • This project is licensed under the terms of the MIT license.

βœ‰οΈ Contact

About

:clipboard: Node.js used with Koa instead of Express middleware, with embedded javascript (EJS) & Bootstrap to display oil well data


Languages

Language:HTML 60.9%Language:JavaScript 39.1%