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
const axios = require('axios'); | |
const { GarminConnect } = require('garmin-connect'); | |
const GCClient = new GarminConnect(); | |
const getExistingActivities = async () => { | |
const existingActivityIds = [] | |
const activities = await axios.get(`${process.env.HOST}/activities`) | |
activities.data.map((activity) => { | |
existingActivityIds.push(activity.activityId) |
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
FROM node:14 AS base | |
# Install dependencies only when needed | |
FROM base AS deps | |
WORKDIR /app | |
# Install dependencies based on the preferred package manager | |
COPY package.json yarn.lock* package-lock.json* pnpm-lock.yaml* ./ | |
RUN npm install |
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
import React, { useState, useEffect, useRef } from 'react'; | |
import { Feature, Map, View } from 'ol'; | |
import TileLayer from 'ol/layer/Tile'; | |
import Overlay from 'ol/Overlay'; | |
import OSM from 'ol/source/OSM'; | |
import {fromLonLat} from 'ol/proj'; | |
import 'ol/ol.css'; | |
import VectorLayer from 'ol/layer/Vector'; | |
import VectorSource from 'ol/source/Vector'; |
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
server { | |
# Listen HTTP | |
listen 443 ssl; | |
listen [::]:443 ssl; | |
server_name domain.com; | |
gzip on; | |
gzip_proxied any; | |
gzip_comp_level 4; |