https://github.com/totem-gdn/totem-core-explorer-api
https://github.com/totem-gdn/totem-core-explorer-api
Last synced: 4 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/totem-gdn/totem-core-explorer-api
- Owner: Totem-gdn
- License: mit
- Created: 2022-12-06T18:35:02.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-04-28T22:11:58.000Z (about 1 year ago)
- Last Synced: 2024-12-29T14:41:44.642Z (6 months ago)
- Language: TypeScript
- Size: 333 KB
- Stars: 0
- Watchers: 3
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Totem Core Explorer API
Totem Core Explorer API service provide an API gateway for
the [Totem Core Explorer Backend](https://github.com/Totem-gdn/totem-core-explorer-backend) service.## Development
1. Install dependencies:
```bash
npm install
```
2. Create [Redis](https://redis.io/docs/stack/get-started/install/docker/) in Docker, or use local variant.
3. Create `.env` file from example `.env.sample` and fill in environment variables:
```dotenv
PORT=3000
REDIS_URL=redis://127.0.0.1:6379/0
EXPLORER_BACKEND_URL=127.0.0.1:50051
```
4. Run service in development mode:
```bash
npm run start:dev
```
Debug mode:
```bash
npm run start:debug
```
If Node.js default debug port `9229` is busy -- you can change it like this:
```bash
npm run start:debug -- --debug 0.0.0.0:9228
```## Build without Docker
1. Build service with version ([git](https://git-scm.com/) required):
```bash
npm run build
```
Build service without version (without git):
```bash
npm run build:app
```
2. Run service:
```bash
node dist/main
```## Build with Docker
1. Build docker image:
```bash
docker build -f deployment/docker/Dockerfile -t totem-core-explorer-api:latest .
```