docs: create development setup documentation

This commit is contained in:
2025-12-07 16:55:47 +07:00
parent c2a192d499
commit 8a227863d1

View File

@@ -1,18 +1,20 @@
# Blogservice
# Nooblearn2code Blog Service
To start your Phoenix server:
### Development
1. Cài đặt `asdf``asdf-elixir` cũng như `asdf-erlang`
2. Cài đặt Elixir và Erlang ở dưới Local:
```bash
asdf install erlang <erlang version>
asdf install elixir <elixir version>
```
**Lưu ý**: với Erlang version và Elixir version được định nghĩa trong file [.tool-versions](.tool-versions).
3. Setup database ở local (yêu cầu có Docker, nếu không dùng Docker có thể dựa vào các environment variable ở trong file [docker-compose.yml](docker-compose.yml)).
```bash
docker compose up -d
```
4. Cài đặt các dependencies và setup database cho Ecto.
```bash
mix deps.get && mix compile
mix ecto.setup
```
* Run `mix setup` to install and setup dependencies
* Start Phoenix endpoint with `mix phx.server` or inside IEx with `iex -S mix phx.server`
Now you can visit [`localhost:4000`](http://localhost:4000) from your browser.
Ready to run in production? Please [check our deployment guides](https://hexdocs.pm/phoenix/deployment.html).
## Learn more
* Official website: https://www.phoenixframework.org/
* Guides: https://hexdocs.pm/phoenix/overview.html
* Docs: https://hexdocs.pm/phoenix
* Forum: https://elixirforum.com/c/phoenix-forum
* Source: https://github.com/phoenixframework/phoenix