Co-authored-by: Renovate Bot <renovate.bot@chrisb.xyz> Co-committed-by: Renovate Bot <renovate.bot@chrisb.xyz> |
||
---|---|---|
.github/workflows | ||
.vscode | ||
public | ||
src | ||
.browserslistrc | ||
.eslintrc.cjs | ||
.gitignore | ||
.prettierrc.json | ||
.stylelintrc.json | ||
README.md | ||
astro.config.mjs | ||
package-lock.json | ||
package.json | ||
renovate.json | ||
tsconfig.json |
README.md
Watch watch-mints
Fun little app for displaying a historical discord record.
Uses mongodb to store discord history, and requires the environment variables:
MONGODB_URI=""
DB_NAME=""
DB_USER=""
DB_PASSWORD=""
Steps for future me
-
Fetch discord post using fetch-discord
-
Upload posts to a mongodb. Mongo Atlas is free (right now, might not be next time).
- You'll need to upload with mongo-tools in the format
mongoimport --uri mongodb+srv://<USERNAME>:<PASSWORD>@<CLUSTER_NAME>/<DATABASE> --collection <COLLECTION> --type json --file <FILENAME> --jsonArray
- You'll need to upload with mongo-tools in the format
-
Update the timestamp field to a datetime type:
db.posts.updateMany({}, [{ "$set": { "timestamp": { "$toDate": "$timestamp" } }}]);
-
Update env varibles to point to the db, and run the project!