https://github.com/azrubael/230207-mongohit
Visit web counter, a MongoDB version
https://github.com/azrubael/230207-mongohit
Last synced: about 1 year ago
JSON representation
Visit web counter, a MongoDB version
- Host: GitHub
- URL: https://github.com/azrubael/230207-mongohit
- Owner: Azrubael
- Created: 2023-02-07T12:34:42.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-02-16T18:42:38.000Z (over 3 years ago)
- Last Synced: 2025-02-15T10:32:19.585Z (over 1 year ago)
- Language: JavaScript
- Size: 34.2 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Page hit counter (MongoDB version)
From the project directory, download and start MongoDB in a terminal using:
```sh
docker-compose up
```
Install then start the Node.js page hit application in another terminal:
```sh
npm install
npm start
```
Start a web server in another terminal:
```sh
npx small-static-server 8888 ./test
```
Visit or to view the page counter. Refresh the page to see it increase.
To view data, open the Adminer client at with the credentials:
* Server: **host.docker.internal** (or your network IP address)
* Username: *
* Password: *
* Database: *
## Shutdown
Stop the Docker MongoDB server in a terminal using:
```sh
docker-compose down
```
Press `Ctrl` | `Cmd` + `C` to stop the Node.js application and web server.