notification-preference-center

所属分类:微服务
开发工具:TypeScript
文件大小:0KB
下载次数:0
上传日期:2022-08-19 08:02:41
上 传 者sh-1993
说明:  可以用作通知首选中心的微API
(A micro API which can be used as a preference center for notifications)

文件列表:
.dockerignore (29, 2022-08-19)
.editorconfig (171, 2022-08-19)
.env (202, 2022-08-19)
.eslintrc (382, 2022-08-19)
LICENSE.md (1072, 2022-08-19)
docker-compose.yml (1392, 2022-08-19)
docs/ (0, 2022-08-19)
docs/.nojekyll (1, 2022-08-19)
docs/api.yaml (1422, 2022-08-19)
docs/index.html (956020, 2022-08-19)
docs/paths/ (0, 2022-08-19)
docs/paths/events.yaml (1051, 2022-08-19)
docs/paths/users.yaml (833, 2022-08-19)
docs/paths/users@{id}.yaml (1325, 2022-08-19)
docs/schema/ (0, 2022-08-19)
docs/schema/Consent.yaml (201, 2022-08-19)
docs/schema/Event.yaml (262, 2022-08-19)
docs/schema/User.yaml (297, 2022-08-19)
docs/schema/shared/ (0, 2022-08-19)
docs/schema/shared/ConsentType.yaml (94, 2022-08-19)
docs/schema/shared/UUID.yaml (72, 2022-08-19)
jest.config.js (135, 2022-08-19)
package.json (1936, 2022-08-19)
prisma/ (0, 2022-08-19)
prisma/migrations/ (0, 2022-08-19)
prisma/migrations/20220408223036_init/ (0, 2022-08-19)
prisma/migrations/20220408223036_init/migration.sql (858, 2022-08-19)
prisma/migrations/20220408233319_add_value_for_the_consent/ (0, 2022-08-19)
prisma/migrations/20220408233319_add_value_for_the_consent/migration.sql (84, 2022-08-19)
prisma/migrations/20220409003604_change_consent_value_column/ (0, 2022-08-19)
prisma/migrations/20220409003604_change_consent_value_column/migration.sql (239, 2022-08-19)
prisma/migrations/20220409094056_introduce_consents_table_rename_consent_types/ (0, 2022-08-19)
prisma/migrations/20220409094056_introduce_consents_table_rename_consent_types/migration.sql (862, 2022-08-19)
prisma/migrations/migration_lock.toml (121, 2022-08-19)
prisma/schema.prisma (917, 2022-08-19)
src/ (0, 2022-08-19)
src/app.test.ts (6537, 2022-08-19)
src/app.ts (968, 2022-08-19)
... ...

## Notification Preference Center The notification center, is an API you can use as a micro-service in order to store notification consents provided by your users ### Running the project with Docker To run the project with Docker, simply run: ``` docker-compose up ``` This will start a MySQL and the App containers, migrate the database and start the server. The app will be available at [http://localhost:3000](http://localhost:3000) ### Running without Docker To start the project without docker you need to do the following: - Install the project's dependencies with `yarn` - Specify a database URL in the proper format, for example `mysql://root:qwerty1@localhost:3306/notifications` - Use the database URL and start the server ``` DATABASE_URL= nodemon src/index.ts ``` ### Developing The development version uses [`nodemon`](https://www.npmjs.com/package/nodemon) which means that whenever you save a file, the application server will restart ### Running the tests If you're using Docker, you can just enter the container by running ``` docker exec -it notifiations_center_app /bin/sh ``` then inside the container, run ``` yarn test ``` If you're not Docker, you need to specify the URL for the test database, for example `mysql://root:qwerty1@localhost:3306/notifications_test_db` then run ``` APP_PORT=4000 DATABASE_URL= && yarn run prisma migrate reset --force && jest --bail --verbose ``` ### Documentation The API's documentation can be found on the following URL: https://www.falexandrou.com/notification-preference-center/ ### Reporting issues / Pull Request Reporting issues and submit a pull requests is more than welcome. Please feel free to contribute

近期下载者

相关文件


收藏者