https://github.com/wickenico/loganywhere
A practical guide for building a log server using Express.js, ngrok and Swift. This setup allows devices without localhost access to send logs via an ngrok URL, making remote logging easy and accessible.
https://github.com/wickenico/loganywhere
express-js logging logs ngrok swift
Last synced: 5 months ago
JSON representation
A practical guide for building a log server using Express.js, ngrok and Swift. This setup allows devices without localhost access to send logs via an ngrok URL, making remote logging easy and accessible.
- Host: GitHub
- URL: https://github.com/wickenico/loganywhere
- Owner: wickenico
- License: mit
- Created: 2024-10-29T21:49:01.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-10-29T22:12:53.000Z (over 1 year ago)
- Last Synced: 2025-04-04T02:22:39.824Z (about 1 year ago)
- Topics: express-js, logging, logs, ngrok, swift
- Language: Swift
- Homepage:
- Size: 19.5 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# LogAnywhere
A practical guide for building a log server using Express.js, ngrok and Swift. This setup allows devices without localhost access to send logs via an ngrok URL, making remote logging easy and accessible.
## Getting Started
### Starting the Log Server
1. **Clone the repository:**
```sh
git clone https://github.com/yourusername/LogAnywhere.git
cd LogAnywhere
```
2. **Change to log server directory:**
```sh
cd log-server
```
3. **Install dependencies:**
```sh
npm install
```
4. **Start the server:**
```sh
node server.js
```
### Setting Up ngrok
To expose your local server to the internet, you need to use ngrok. Follow the instructions in the [ngrok README](https://github.com/wickenico/LogAnywhere/tree/5605a96c05df98a6860892e8ea5c7f4107aa3a6a/ngrok) to set up ngrok and obtain a public URL.
### Using the Swift App to Send Logs
1. **Open the Swift project:**
- Navigate to the `DeviceInfoLogger` directory.
- Open `SwiftApp.xcodeproj` in Xcode.
2. **Configure the ngrok URL:**
- In the Swift project, locate the ContentView and where the server URL is set.
- Replace the existing URL with your ngrok URL.
3. **Run the Swift app:**
- Build and run the app on your device or simulator.
- Use the app interface to send logs to your server.