This repository has been archived by the owner on Jun 13, 2023. It is now read-only.
forked from n3-rd/MBTDb
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request n3-rd#1 from ibrahimraimi/main
Refractor code base
- Loading branch information
Showing
4 changed files
with
13 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters