Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ahmedbhameed/auth_service
Authentication service for echo systems.
https://github.com/ahmedbhameed/auth_service
Last synced: 27 days ago
JSON representation
Authentication service for echo systems.
- Host: GitHub
- URL: https://github.com/ahmedbhameed/auth_service
- Owner: AhmedBHameed
- Created: 2021-01-01T21:24:40.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2022-09-27T21:10:28.000Z (about 2 years ago)
- Last Synced: 2024-04-24T15:09:01.188Z (7 months ago)
- Language: TypeScript
- Homepage:
- Size: 851 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
Awesome Lists containing this project
README
# xcentral-node-graphql
Represent [Xentral APIs](https://github.com/xentral-erp-software-gmbh/xentral) as graphql queries written with node.js
# Run development environment locally
- Clone the repo.
- Install dependencies using `yarn` or `npm i`.
- Run the server using `yarn dev`.If all steps correct, then you should see the following log:
```bash
đĄī¸ ############################################đĄī¸âšī¸ Server is listening to:
đ 192.168.0.94
đ¨ Build ver: 0.0.1
đŗ Development modeâšī¸ Server end-points:
âī¸ http://localhost:9000/changelog
âī¸ http://localhost:9000/v1/graphqlđĄī¸ ############################################đĄī¸
```# Run development environment with docker
- Install `docker` and `docker-compose`
- Run the following commend for **development** `docker-compose -f docker-compose.yml up`
- Run the following commend for **production** `docker-compose -f docker-compose.prod.yml up`PS: You have to change `XENTRAL_BASE_API` in `src/config/environment` in order to bind your graphql with APIs.
# Building
- Run `yarn build` or `npm run build`.
- Then you can run the build version using `yarn start` or `npm run start`.If all steps correct, then you should see the following log:
```bash
đĄī¸ ############################################đĄī¸âšī¸ Server is listening to:
đ¨ Build ver: 0.0.1
đŗ Production modeâšī¸ Server end-points:
âī¸ http://localhost:9000/changelog
đĄī¸ ############################################đĄī¸
```# Testing
You can test the application by running `yarn test` or `npm run test`. When finished, it will generate `coverage` statistics.
If you want to work with testing, it is better to run `yarn test:debug` or `npm run test:debug`. This script is running in `watch mode` using `--verbose` flag to show more testing details with no `coverage` table.
We use two type of testing to insure code quality:
- Unit test.
- Integration test.## Unit test
Unit test is used to check all internal data source functionality. It is mocking parts of the code and tested according to some specification. All unit test will prefixed with `[UT]` to distinguish between tests.
## Integration test
Apollo server has it's own functionality to mock resolvers. The test is checking if apollo client responding correctly to the query that we pass via `POST` method. All integration test will prefixed with `[IT]`.
Integration test is a good source of app specifications.
To lean more about integration test check their [documentation](https://www.apollographql.com/docs/apollo-server/testing/testing/)
# Versioning
Please follow the following versioning steps for better documentation and changelog.
We have 3 major commits:
- **feature:** - for new feature.
- **fix:** - for hotfix, bugfix and others.
- **break:** - for breaking changes._Examples:_
- **fix:** \[#TASK_ID_CLICKUP\] Created changelog for app **(#COMMMIT_SHA)**
- **feature:** \[#TASK_ID_CLICKUP\] Created changelog for app **(#COMMMIT_SHA)**
- **break:** \[#TASK_ID_CLICKUP\] Created changelog for app **(#COMMMIT_SHA)**By doing the following commits structure, **changelog.md** will auto update due to the `auto-changelog` library.
Juhuuuu!!! you deserve a cup of coffee â