Skip to content

Latest commit

 

History

History
120 lines (77 loc) · 2.25 KB

File metadata and controls

120 lines (77 loc) · 2.25 KB

Rust Web Server

Stack

Server

  • Rust
  • Actix Web
  • PostgreSQL

Client

  • TypeScript
  • React
  • Material UI

Development

To start developing you should build the base_image for server and client running the command below

docker compose build server_base_image client_base_image

After that you can start both using the command

docker compose up server client

Server

The base_image contains all compiled dependencies to be used in development, testing and build for production.

You can build it manually with

docker compose build server_base_image

To start's server in development mode

docker compose up server

To build server for production

docker compose build server_build

To run tests

# in watch mode
docker compose run --rm server_test

# for single execution
docker compose run --rm server_test ./scripts/test.sh

# for single execution with coverage
docker compose run --rm server_test ./scripts/test_coverage.sh

To debug database

# in development and test environment
docker compose exec database psql -U postgres -d database

Client

As the same as server, the base_image contains all dependencies to be used in development, testing and build for production.

You can build it manually with

docker compose build client_base_image

To start's in development mode

docker compose up client

To build client for production

docker compose build client_build

References

Actix Web

PostgreSQL

Testing Rust Code

Generate Code Coverage