mirror of
https://github.com/politics-rewired/switchboard-rewired.git
synced 2026-12-04 10:29:49 +00:00
Send and receive messages using various telecom aggregators
- PLpgSQL 59.5%
- TypeScript 31.5%
- JavaScript 8.7%
- Lua 0.1%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| .github/workflows | ||
| .vscode | ||
| deploy | ||
| docs | ||
| lua | ||
| migrations | ||
| scripts | ||
| src | ||
| typings | ||
| .dockerignore | ||
| .env.example | ||
| .gitignore | ||
| .nvmrc | ||
| .prettierignore | ||
| .prettierrc.js | ||
| .versionrc.js | ||
| CHANGELOG.md | ||
| commitlint.config.js | ||
| dangerfile.ts | ||
| database.json | ||
| Dockerfile | ||
| jest.config.js | ||
| LICENSE | ||
| package.json | ||
| README.md | ||
| schema-dump.sql | ||
| tsconfig.json | ||
| tslint.json | ||
| update-dump.sh | ||
| yarn.lock | ||
Switchboard
Developing
Environment setup
Copy the example environment. You may need to update the database connection string.
cp .env.example .env
vi .env
Install dependencies
# With Node 16.14
yarn install
Create databases:
psql -c "create database switchboard;"
psql -c "create database switchboard_test;"
Switchboard alters owners of many function to "postgres", which can throw errors (especially on postgres installed through homebrew on macOS), create a postgres user
psql -c "create user postgres;"
Bootstrap database and run tests
NODE_ENV=development dotenv -- yarn bootstrap-db
NODE_ENV=test dotenv -- yarn bootstrap-db
# Run tests
yarn test
Start dev server
# Run server in watch mode
yarn dev
Releasing
This project uses standard-version to manage releases.
yarn release
Other helpful options are:
# Preview the changes
yarn release --dry-run
# Specify the version manually
yarn release --release-as 1.5.0
# or the semver version type to bump
yarn release --release-as minor
# Specify an alpha release
yarn release --prerelease
# or the pre-release type
yarn release --prerelease alpha
For all standard-version options see CLI Usage.
Deploying
?