- 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/f62d180dc6746a81db245198f4861746a3c0815873a9cd2c23d3c2b7d648adae/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6173742d636f6d6d69742f416e647265774a426174656d616e2f6e6f64652d6b6f612d646174613f7374796c653d706c6173746963)
- 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.
![Image](./img/list.png)
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.
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,
});
});
- 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.
- This project is licensed under the terms of the MIT license.