|
1 |
| -# Platformatic Runtime API |
| 1 | +# Platformatic App |
2 | 2 |
|
3 |
| -This is a generated [Platformatic Runtime](https://docs.platformatic.dev/docs/runtime/overview) application. |
| 3 | +This sample project demonstrates how to deploy a simplist Platformatic service that returns "Platformatic x Defang" when accessed. The project includes a Dockerized setup with Docker Compose, making it easy to deploy and manage the service. |
4 | 4 |
|
5 |
| -## Requirements |
| 5 | +Once your app is up and running, you can access it via the defined port (default is 3042). This service is designed to be simple, showcasing how to set up a basic Platformatic application and deploy it using Docker. |
6 | 6 |
|
7 |
| -Platformatic supports macOS, Linux and Windows ([WSL](https://docs.microsoft.com/windows/wsl/) recommended). |
8 |
| -You'll need to have [Node.js](https://nodejs.org/) >= v18.8.0 or >= v20.6.0 |
| 7 | +## Prerequisites |
9 | 8 |
|
10 |
| -## Setup |
| 9 | +1. Download <a href="https://github.com/defang-io/defang">Defang CLI</a> |
| 10 | +2. (optional) If you are using <a href="https://docs.defang.io/docs/concepts/defang-byoc">Defang BYOC</a>, make sure you have properly <a href="https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-configure.html">authenticated your AWS account</a>. |
11 | 11 |
|
12 |
| -1. Install dependencies: |
| 12 | +## Deploying |
13 | 13 |
|
14 |
| -```bash |
15 |
| -npm install |
16 |
| -``` |
| 14 | +1. Open the terminal and type `defang login` |
| 15 | +2. Navigate to the directory "app" with `cd ./app` |
| 16 | +3. Type `defang compose up` in the CLI. |
| 17 | +4. Your app will be running within a few minutes. |
17 | 18 |
|
18 |
| -## Usage |
| 19 | +## Local Development |
19 | 20 |
|
20 |
| -Run the API with: |
| 21 | +1. After cloning the repository and navigating to the root directory of the project, navigate to the directory called "app" with `cd app` |
| 22 | +2. Run `docker compose -f compose.dev.yaml up --build` |
21 | 23 |
|
22 |
| -```bash |
23 |
| -npm start |
24 |
| -``` |
| 24 | +--- |
25 | 25 |
|
26 |
| -## Adding a Service |
| 26 | +Title: Platformatic |
27 | 27 |
|
28 |
| -Adding a new service to this project is as simple as running `create-platformatic` again, like so: |
| 28 | +Short Description: A sample project showcasing a simple Platformatic service with Docker deployment. |
29 | 29 |
|
30 |
| -``` |
31 |
| -npx create-platformatic |
32 |
| -``` |
| 30 | +Tags: Platformatic, Defang, Docker, Node.js, Service, JavaScript |
| 31 | + |
| 32 | +Languages: nodejs |
0 commit comments