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
+24-14
Original file line number
Diff line number
Diff line change
@@ -10,6 +10,15 @@ This project uses the MariaDB Node.js connector in combination with the [Sequeli
10
10
</kbd>
11
11
</p>
12
12
13
+
This application is made of two parts:
14
+
15
+
* Client
16
+
- web UI that communicates with REST endpoints available through an API app (see below).
17
+
- is a React.js project located in the [client](src/client) folder.
18
+
* API
19
+
- uses the [MariaDB Node.js Connector](https://github.com/mariadb-corporation/mariadb-connector-nodejs) with [Sequelize](https://sequelize.org/) to connect to MariaDB.
20
+
- is a Node.js project located int the [api](src/api) folder.
21
+
13
22
This README will walk you through the steps for getting the TODO web application up and running using MariaDB.
14
23
15
24
# Table of Contents
@@ -19,7 +28,8 @@ This README will walk you through the steps for getting the TODO web application
19
28
4.[Create the database and table](#schema)
20
29
5.[Configure, build and run the app](#app)
21
30
1.[Configure](#configure-app)
22
-
2.[Build and run](#build-run)
31
+
2.[Build and run the API app](#build-run-api)
32
+
3.[Build and run the Client app](#build-run-client)
23
33
6.[Support and contribution](#support-contribution)
24
34
7.[License](#license)
25
35
@@ -82,10 +92,10 @@ CREATE TABLE todo.tasks (
82
92
This application is made of two parts:
83
93
84
94
* Client
85
-
- communicates with the API.
95
+
-web UI that communicates with REST endpoints available through an API app (see below).
86
96
- is a React.js project located in the [client](src/client) folder.
87
97
* API
88
-
- uses the [MariaDB Node.js Connector](https://github.com/mariadb-corporation/mariadb-connector-nodejs) to connect to MariaDB.
98
+
- uses the [MariaDB Node.js Connector](https://github.com/mariadb-corporation/mariadb-connector-nodejs)with [Sequelize](https://sequelize.org/)to connect to MariaDB.
89
99
- is a Node.js project located int the [api](src/api) folder.
90
100
91
101
### a.) Configure the app <aname="configure-app"></a>
@@ -144,27 +154,27 @@ const sequelize = new Sequelize(process.env.DB_NAME, process.env.DB_USER, proces
144
154
});
145
155
```
146
156
147
-
### b.) Build and run the app <aname="build-run-app"></a>
157
+
### b.) Build and run the app <aname="build-run-api"></a>
148
158
149
-
Within separate terminal windows perform the following steps:
159
+
To start and run the API application you need to execute the following commands within the [root folder](src/api).
150
160
151
-
1. Install the Node.js packages (dependendies) for the [client](src/client) and [api](src/api) apps using the `npm install` command.
161
+
1. Install the Node.js packages (dependendies) for the app.
152
162
153
-
_For example:_
154
163
```bash
155
-
$ npm install ./src/client
156
-
$ npm install ./src/api
164
+
$ npm install
157
165
```
158
166
159
-
2. Run the [client](src/client) and [api](src/api) apps using the `npm start` command.
167
+
2. Run the the app, which will expose API endpoints via http://localhost:8080.
160
168
161
-
_For example:_
162
169
```bash
163
-
$ npm start --prefix ./src/api
164
-
$ npm start --prefix ./src/client
170
+
$ npm start
165
171
```
166
172
167
-
**Note:** You will need to use seperate terminals for the `client` and `api` apps.
173
+
### c.) Build and run the [UI (Client) app](src/client) <aname="build-run-client"></a>
174
+
175
+
Once the API project is running you can now communicate with the exposed endpoints directly (via HTTP requests) or with the application UI, which is contained with the [client](src/client) folder of this repo.
176
+
177
+
To start the [client](src/client) application follow the instructions [here](https://github.com/mariadb-developers/todo-app-client).
168
178
169
179
## Support and Contribution <aname="support-contribution"></a>
0 commit comments