https://github.com/groda/locate-me-now
Show your location on a map
https://github.com/groda/locate-me-now
glitch leafletjs location-services openstreetmap
Last synced: 12 months ago
JSON representation
Show your location on a map
- Host: GitHub
- URL: https://github.com/groda/locate-me-now
- Owner: groda
- Created: 2024-09-30T14:20:02.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-06-17T12:27:43.000Z (12 months ago)
- Last Synced: 2025-06-17T13:24:17.645Z (12 months ago)
- Topics: glitch, leafletjs, location-services, openstreetmap
- Language: HTML
- Homepage:
- Size: 92.8 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README

# ð Where Am I?
Show your current location on a map ð.
## ð Run on Glitch
Simply click the link below to run the app on Glitch:
[**Locate Me Now on Glitch**](https://locate-me-now.glitch.me/) ð
> **Note:** The app is hosted on **Glitch**, which will be shutting down its app hosting infrastructure soon. Please refer to the [announcement](https://blog.glitch.com/post/changes-are-coming-to-glitch/) for more details. In the future, I might need to consider migrating to another hosting platform. ð¡
## ð» Run on Your Local Machine
This guide is for **Mac OS**. Follow these steps to run the app locally on your machine:
1. **Download Node.js®**
Get Node.js from [here](https://nodejs.org/en/download/package-manager).
(For Mac, I recommend **v20.17.0 (LTS)** / macOS / using **nvm** for version management.)
Open your terminal and run the following commands:
```bash
# Install nvm (Node Version Manager)
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.0/install.sh | bash
# Download and install Node.js (may require restarting the terminal)
nvm install 20
# Verify the correct version of Node.js
node -v # should output `v20.17.0`
# Verify the correct version of npm
npm -v # should output `10.8.2`
```
2. **(Optional) Use Specific Node Version**
Not sure if this is required, but if needed:
```bash
nvm use 20.17.0
```
3. **Install Express**
To install the required dependencies:
```bash
npm install express
```
4. **Clone the Repository**
Clone the repo to your local machine:
```bash
git clone https://github.com/groda/locate-me-now.git
```
5. **Change Directory**
Navigate into the project directory:
```bash
cd locate-me-now
```
6. **Start the App**
Run the app with the following command:
```bash
node server.js
```
7. **Access the App**
Once the app starts, you should see a message like:
`Your app is listening on port 59257` (port number may vary).
Open [http://127.0.0.1:59257](http://127.0.0.1:59257) in your browser to view the app in action! ð
## ð°ïž How It Works
The app uses the **Geolocation API** provided by modern browsers to determine your current location. It leverages the `getCurrentPosition()` function, which you can learn more about in the [MDN documentation](https://developer.mozilla.org/en-US/docs/Web/API/Geolocation/getCurrentPosition). This function retrieves the geographic location of your device, allowing the app to display your position on a map! ðð