β‘ 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 last commit](https://camo.githubusercontent.com/3e1294234fba2a4102b2e6f6c5d48ec9b989050f6d30ca383177370bd3350f14/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6173742d636f6d6d69742f416e647265774a426174656d616e2f6e6f64652d6b6f612d646174613f7374796c653d706c6173746963)
π 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](https://raw.githubusercontent.com/AndrewJBateman/node-koa-data/main/./img/list.png)
πΆ 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
π» 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