Skip to content

Latest commit

 

History

History
114 lines (74 loc) · 2.16 KB

File metadata and controls

114 lines (74 loc) · 2.16 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 running the command below

docker compose build server_base_image

After that you can start both server and client using the command

docker compose up server client

Now you can access http://localhost:5173/ to use the app

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 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 build server for production

docker compose build server_build

To debug database

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

Client

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