No description
Find a file
2023-07-21 02:55:04 +02:00
src add activitypub ID fields to blog and post 2023-07-21 02:55:04 +02:00
.eslintignore switch compiler to swc, add eslint 2023-07-21 01:27:24 +02:00
.eslintrc.json switch compiler to swc, add eslint 2023-07-21 01:27:24 +02:00
.gitignore switch compiler to swc, add eslint 2023-07-21 01:27:24 +02:00
.prettierignore switch compiler to swc, add eslint 2023-07-21 01:27:24 +02:00
.swcrc switch compiler to swc, add eslint 2023-07-21 01:27:24 +02:00
LICENSE init 2023-07-20 18:00:46 +02:00
package.json fix typeorm commands + add documentation about creating migrations 2023-07-21 02:54:50 +02:00
pnpm-lock.yaml switch compiler to swc, add eslint 2023-07-21 01:27:24 +02:00
README.md fix typeorm commands + add documentation about creating migrations 2023-07-21 02:54:50 +02:00
tsconfig.json fix typeorm commands + add documentation about creating migrations 2023-07-21 02:54:50 +02:00

Mercury

ActivityPub server implementation (hopefully, eventually), currently mostly a way for me to play around with writing an API server in TypeScript.

Configuration

For now, check out src/config.ts, the names should be mostly self explanatory. Consider all environment variables required.

Development commands

  • Building the server: pnpm build
  • Migrating the database: pnpm migrate
  • Watching for changes and reloading the server automatically: pnpm dev
  • Formatting: pnpm format
  • Linting (if you don't have an ESLint plugin): pnpm format

Creating migrations

Creating migrations is a little awkward because TypeORM expects ts-node, which uses tsc. To create a migration, first run pnpm build, then run pnpm typeorm migration:generate -p -d ./dist/db/index.js ./src/db/migrations/<name>, replacing <name> with the name of the migration you're creating. Then rename the created file to end in .js and remove the TypeScript-specific code from it. (Yes, this is incredibly janky, but it works, and it only needs to be done once per migration, actually migrating works flawlessly)

License

Mercury is licensed under the GNU Affero General Public License, version 3 only.