Skip to content

Instantly share code, notes, and snippets.

View tmcw's full-sized avatar
💭
merging your prs

Tom MacWright tmcw

💭
merging your prs
View GitHub Profile

So, as I mentioned last time, I have two fundamental goals with dat that are not addressed by simply running dat share.

  • Uptime: making sure that the site is seeded even if my local laptop is closed, eaten by a bear, or disconnected from the internet
  • Resilience: ensuring that there's a way to restart my website if the original seeding computer is lost. I try to make everything on my primary work/personal computer work in such a way that I can recover it all, easily, onto a new machine if I need to

To break these down a bit more, uptime is a combination of two things:

  • Ensuring that there are seeders
  • Ensuring that those seeders are seeding, and they're up-to-date
import path from "path";
import baseConfig from "./rollup.base.config.js";
import resolve from "rollup-plugin-node-resolve";
import commonjs from "rollup-plugin-commonjs";
import globals from "rollup-plugin-node-globals";
import json from "rollup-plugin-json";
import alias from "rollup-plugin-alias";
export default Object.assign(baseConfig, {
entry: "index.js",
import path from "path";
import baseConfig from "./rollup.base.config.js";
import resolve from "rollup-plugin-node-resolve";
import commonjs from "rollup-plugin-commonjs";
import globals from "rollup-plugin-node-globals";
import json from "rollup-plugin-json";
export default Object.assign(baseConfig, {
entry: "index.js",
dest: "prettier.js",
{
"idMap": {
"1": {
"artist": "Luis Fonsi",
"id": "5CtI0qwDJkDQGwXD1H1cLb",
"track": "Despacito - Remix"
},
"2": {
"artist": "DJ Khaled",
"id": "1OAh8uOEOvTDqkKFsKksCi",
{
"idMap": {
"1": {
"artist": "Luis Fonsi",
"id": "5CtI0qwDJkDQGwXD1H1cLb",
"track": "Despacito - Remix"
},
"2": {
"artist": "DJ Khaled",
"id": "1OAh8uOEOvTDqkKFsKksCi",
{
"idMap": {
"1": {
"artist": "Luis Fonsi",
"id": "5CtI0qwDJkDQGwXD1H1cLb",
"track": "Despacito - Remix"
},
"2": {
"artist": "DJ Khaled",
"id": "1OAh8uOEOvTDqkKFsKksCi",
{
"idMap": {
"1": {
"artist": "The Weeknd",
"id": "5aAx2yezTd8zXrkmtKl66Z",
"track": "Starboy"
},
"2": {
"artist": "The Chainsmokers",
"id": "7BKLCZ1jbUBVqRi2FVlTVw",
This file has been truncated, but you can view the full file.
{
"idMap": {
"1": {
"artist": "The Weeknd",
"id": "5aAx2yezTd8zXrkmtKl66Z",
"track": "Starboy"
},
"2": {
"artist": "The Chainsmokers",
"id": "7BKLCZ1jbUBVqRi2FVlTVw",
{"idMap":{"5aAx2yezTd8zXrkmtKl66Z":{"artist":"The Weeknd","track":"Starboy"},"7BKLCZ1jbUBVqRi2FVlTVw":{"artist":"The Chainsmokers","track":"Closer"},"4pdPtRcBmOSQDlJ3Fk945m":{"artist":"DJ Snake","track":"Let Me Love You"},"5knuzwU65gJK7IF5yJsuaW":{"artist":"Clean Bandit","track":"Rockabye (feat. Sean Paul & Anne-Marie)"},"1xznGGDReH1oQq0xzbwXa3":{"artist":"Drake","track":"One Dance"},"343YBumqHu19cGoGARUTsd":{"artist":"Drake","track":"Fake Love"},"6b8Be6ljOzmkOmFslEb23P":{"artist":"Bruno Mars","track":"24K Magic"},"5MFzQMkrl1FOOng9tq6R9r":{"artist":"Maroon 5","track":"Don't Wanna Know"},"6fujklziTHa8uoM5OQSfIo":{"artist":"Rae Sremmurd","track":"Black Beatles"},"5GXAXm5YOmYT0kL5jHvYBt":{"artist":"The Weeknd","track":"I Feel It Coming"},"6mICuAdrwEjh6Y6lroV2Kg":{"artist":"Shakira","track":"Chantaje"},"3NdDpSvN911VPGivFlV5d0":{"artist":"ZAYN","track":"I Don’t Wanna Live Forever (Fifty Shades Darker) - From \"Fifty Shades Darker (Original Motion Picture Soundtrack)\""},"5uCax9HTNlzGybIStD3vDh":{"artist":"James Ar
This file has been truncated, but you can view the full file.
[
{
"date": "2017-12-31",
"[\"7wGoVu4Dady5GV0Sv4UIsx\",\"Post Malone\",\"rockstar\"]": 5273727,
"[\"0ofbQMrRDsUaVKq2mGLEAb\",\"Camila Cabello\",\"Havana\"]": 4540789,
"[\"2ekn2ttSfGqwhhate0LSR0\",\"Dua Lipa\",\"New Rules\"]": 4497944,
"[\"7qiZfU4dY1lWllzX7mPBI3\",\"Ed Sheeran\",\"Shape of You\"]": 3543846,
"[\"7EmGUiUaOSGDnUUQUDrOXC\",\"Selena Gomez\",\"Wolves\"]": 3466612,
"[\"5UEnHoDYpsxlfzWLZIc7LD\",\"Eminem\",\"River (feat. Ed Sheeran)\"]": 3209075,
"[\"3hBBKuWJfxlIlnd9QFoC8k\",\"Maroon 5\",\"What Lovers Do (feat. SZA)\"]": 3132182,