Skip to content

Commit 84e6ca5

Browse files
committed
the simple backend listen to the 4430 port now
1 parent 17eb4e8 commit 84e6ca5

File tree

5 files changed

+18
-9
lines changed

5 files changed

+18
-9
lines changed

.env

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,6 @@
77
# Real environment variables win over .env files.
88
#
99
# DO NOT DEFINE PRODUCTION SECRETS IN THIS FILE NOR IN ANY OTHER COMMITTED FILES.
10-
ENTRYPOINT="https://localhost/api"
10+
SIMPLE_HTTP_PORT=8000
11+
SIMPLE_HTTPS_PORT=4430
12+
SIMPLE_ENTRYPOINT=https://localhost:${SIMPLE_HTTPS_PORT}/api

CONTRIBUTING.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -107,14 +107,16 @@ Install everything:
107107
cd admin
108108
# Install JS dependencies
109109
make install
110-
# Initizalize a .env containing the URL of the API
110+
# (optional) Initizalize a .env containing the URL of the API
111111
make cp-env
112112
```
113113

114-
The default API URL is in the `.env`. Change it at will:
114+
The default API URL is in the `.env`. You can customize it according to your needs:
115115

116116
```env
117-
ENTRYPOINT=https://localhost/api
117+
SIMPLE_HTTP_PORT=8000
118+
SIMPLE_HTTPS_PORT=4430
119+
SIMPLE_ENTRYPOINT=https://localhost:${SIMPLE_HTTPS_PORT}/api
118120
```
119121

120122
Run the simple API Platform backend (uses docker) and launch Storybook:
@@ -123,9 +125,9 @@ Run the simple API Platform backend (uses docker) and launch Storybook:
123125
make start-simple
124126
```
125127

126-
Go to http://localhost, accept the self-signed certificate, visit http://localhost:6006 to see the running Admin.
128+
Go to http://localhost:4430, accept the self-signed certificate, visit http://localhost:6006 to see the running Admin.
127129

128-
To stop the simple API Platform backend and the storybook:
130+
To stop and prune the simple API Platform backend:
129131

130132
```shell
131133
make stop-simple

Makefile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
include .env
2+
13
.PHONY : help cp-env start-simple stop-simple
24

35
help: ## Outputs this help screen
@@ -10,7 +12,7 @@ cp-env: ## Copy the .env file to .env.local
1012
cp .env .env.local
1113

1214
start-simple: ## Start the simple Api-Platform backend and the Storybook frontend
13-
cd backend/simple && make up && cd .. && yarn run storybook
15+
cd backend/simple && make build && make up HTTP_PORT=${SIMPLE_HTTP_PORT} HTTP3_PORT=${SIMPLE_HTTPS_PORT} HTTPS_PORT=${SIMPLE_HTTPS_PORT} && cd .. && yarn run storybook
1416

1517
stop-simple: ## Stop and prune the simple Api-Platform backend
1618
cd backend/simple && make prune

backend/simple/Makefile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ help: ## Outputs this help screen
1919

2020
## —— Docker 🐳 ————————————————————————————————————————————————————————————————
2121
build: ## Builds the Docker images
22+
@$(DOCKER_COMP) build
23+
24+
rebuild: ## Pulls and builds the Docker images
2225
@$(DOCKER_COMP) build --pull --no-cache
2326

2427
up: ## Start the docker hub in detached mode (no logs)

src/stories/Basic.stories.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,12 @@ type Story = StoryObj<typeof meta>;
1717

1818
declare const process: {
1919
env: {
20-
ENTRYPOINT: string;
20+
SIMPLE_ENTRYPOINT: string;
2121
};
2222
};
2323

2424
export const Admin: Story = {
2525
args: {
26-
entrypoint: process.env.ENTRYPOINT,
26+
entrypoint: process.env.SIMPLE_ENTRYPOINT,
2727
},
2828
};

0 commit comments

Comments
 (0)