Skip to content

Commit

Permalink
Review
Browse files Browse the repository at this point in the history
  • Loading branch information
xdan committed Aug 25, 2023
1 parent 4be0045 commit c9721ce
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
16.15.0
16.15.0
30 changes: 24 additions & 6 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
# Contributing

Required to run [docker-compose](https://docs.docker.com/compose/)
## Requirements

Required to run [docker-compose](https://docs.docker.com/compose/)

## Getting Started

```sh
git clone git@github.com:mappable-world/mappable-test-server.git
Expand All @@ -15,16 +19,16 @@ In this format:
```dotenv
DATA_PROVIDER="db"
DB_NAME=api
DB_HOST=localhost
DB_USER=postgres
DB_PASSWORD=secret007
DB_HOST=localhost
POSTGRES_USER="postgres"
POSTGRES_PASSWORD="secret007"
PGADMIN_DEFAULT_EMAIL: postgres@admin.com
PGADMIN_DEFAULT_PASSWORD: qwertyuiop
```

`DATA_PROVIDER` can be `db` or `json`
- `DATA_PROVIDER` can be `db` or `json`
- `DB_PASSWORD` and `DB_USER` make your own, they will be used both when initializing the database and when connecting to it
- `PGADMIN_DEFAULT_EMAIL` and `PGADMIN_DEFAULT_PASSWORD` Needed to connect to [pgAdmin](https://www.pgadmin.org/), you don't have to set them if you don't use this service

We start services:

Expand Down Expand Up @@ -55,10 +59,24 @@ npm start

Any changes to the files will automatically restart the test server.

## Testing

To run autotests:

```sh
npm test
```

When you're done, update the version, add the new tag, and push everything to github. Github actios will automatically roll out the new version to heroku.
## Deployment

When you're done, update the version, add the new tag, and push everything to github.
GitHub actions will automatically roll out the new version to heroku.

## Project structure

- `compose` - Folder with data to start services via docker compose
- `docs` - API specification in [OpenAPI](https://www.openapis.org/) format
- `src` - TypeScript code
- `app` - application's code
- `tests` - auto-tests
- `tools` - special tools
1 change: 0 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ COPY --from=build /opt/server/dist dist
COPY ./docs/ ./docs/
COPY ./package-lock.json ./package-lock.json
COPY ./package.json ./package.json
#COPY ./.env ./.env

RUN npm ci --production
RUN npm install --global pm2@latest
Expand Down

0 comments on commit c9721ce

Please sign in to comment.