You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+6Lines changed: 6 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -105,6 +105,12 @@ For example to create a new api route (E.g api/users)
105
105
mkdir src/api/users
106
106
```
107
107
108
+
#### IMPORTANT
109
+
110
+
Rember to use 'npm run dev' to start a local dev server when developing new API endpoints.
111
+
112
+
Once endpoints have been developed and tested then use 'npm run start' to build the docker image and start a container to serve the endpoints on localhost (or use 'npm run rebuild' or 'npm run nuke' if changes need to be made to an existing docker image).
113
+
108
114
#### 2. Create an **api.ts** file in this new folder and add handler logic here - see https://github.com/mswjs/msw for information on writing handlers.
109
115
110
116
Also take a look at the various example handlers in the api folder.
0 commit comments