https://github.com/edgeapp/edge-sync-server
https://github.com/edgeapp/edge-sync-server
Last synced: 4 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/edgeapp/edge-sync-server
- Owner: EdgeApp
- Created: 2020-10-30T03:24:43.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2024-09-13T23:29:46.000Z (over 1 year ago)
- Last Synced: 2025-04-21T08:13:34.435Z (about 1 year ago)
- Language: TypeScript
- Size: 3.12 MB
- Stars: 1
- Watchers: 10
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Edge Sync Server
A HTTP API server to store, retrieve, and synchronize encrypted data between clients and servers. It uses CouchDB as the backend and Express as the HTTP server.
## Usage
### Install
```
yarn
```
### Configuration
A default config `config.json` is automatically created on install. The schema for this file is located in `src/config.ts` and uses [cleaners](https://www.npmjs.com/package/cleaners) for type definitions.
You can use `yarn configure` to re-create the config file if removed.
The config file path can be customized with the `CONFIG` env var.
### Scripts
#### Running Source
```
yarn start
```
#### Running for Development
There is a convenient "dev" script for running a development server which uses nodemon and sucrase to run the server.
```
yarn start.dev
```
#### Build
```
yarn prepare
```
#### Running Build for Production
```
pm2 start pm2.json
```
## Testing
Testing is done with mocha, supertest, and nyc. Test will use the configuration defined in `config.json`, and it will append a random number to the end of the database name defined as `couchDatabase` in your config.
The following run scripts are available for testing:
- `yarn test` runs all the tests.
- `yarn test.report` runs the tests with test coverage reports (provided by nyc).
- `yarn test.watch` continuously run the tests and watch for source code changes.