Skip to content
This repository has been archived by the owner on Jun 13, 2023. It is now read-only.

Commit

Permalink
Merge pull request n3-rd#1 from ibrahimraimi/main
Browse files Browse the repository at this point in the history
Refractor code base
  • Loading branch information
n3-rd authored Jan 23, 2023
2 parents 2dafc1d + f5cc49d commit 1e0ec0f
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 35 deletions.
24 changes: 1 addition & 23 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,48 +1,26 @@

# MDTDb

A database of Main Battle Tanks


A database of Main Battle Tanks

![GitHub repo size](https://img.shields.io/github/repo-size/n3-rd/mbtdb) ![Lines of code](https://img.shields.io/tokei/lines/github/n3-rd/mbtdb) ![GitHub repo file count](https://img.shields.io/github/directory-file-count/n3-rd/mbtdb) ![GitHub last commit](https://img.shields.io/github/last-commit/n3-rd/mbtdb) ![GitHub stars](https://img.shields.io/github/stars/n3-rd/mbtdb?style=social)



## Live version



[live version is here](https://inspolist.netlify.app/)



## Feedback and Bugs



If you have any feedback or bug report, please feel free to raise an issue :)



## Contributing



If you would like to contribute to this amazing project, you can create a Pull Request containing your proposed changes and we will review it. Please check our [contributing guildelines](CONTRIBUTING.md) first. Thank you.



## Contributors



![GitHub Contributors Image](https://contrib.rocks/image?repo=n3-rd/mbtdb)



## Donate



<a href="https://www.buymeacoffee.com/Godwinjemegah" target="_blank"><img src="https://cdn.buymeacoffee.com/buttons/default-green.png" alt="Buy Me A Coffee" style="height: 51px !important;width: 217px !important;" ></a>
23 changes: 11 additions & 12 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,20 +1,19 @@
const express = require("express");
const app = express();
const fs = require("fs");
import express from "express";
import fs from "fs";

const database = fs.readFileSync("db.json");
const app = express();
const PORT = process.env.PORT || 3000;
const database = fs.readFileSync("./json/db.json");
const db = JSON.parse(database);
console.log(db);

app.get("/", (req, res) => {
res.send(db);
res.send(db);
});

app.get("/ping", (req, res) => {
res.sendStatus(200);
})

res.sendStatus(200);
});

app.listen(3000, () => {
console.log("Server running on port 3000");
});
app.listen(PORT, () => {
console.log("Server running on port 3000");
});
File renamed without changes.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"name": "mbtdb",
"version": "1.0.0",
"main": "index.js",
"type": "module",
"description": "A database of Main Battle Tanks",
"license": "MIT",
"dependencies": {
Expand Down

0 comments on commit 1e0ec0f

Please sign in to comment.