Skip to content

Commit a2f6206

Browse files
committed
How to test the code on local for the Server
1 parent b421e4f commit a2f6206

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

Client/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -82,4 +82,4 @@ git clone https://github.com/aderepas/WeekGolf
8282
cd WeekGolf/Client
8383
npm i
8484
npm start
85-
```a
85+
```

Server/README.md

+15
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
* [sample.sql](#samplesql)
1616
* [DEV.sql](#devsql)
1717
* [<img src="../assets/folder-controller.svg" style="height: 30px; display: inline; transform: translateY(5px)"> config](#img-srcassetsfolder-controllersvg-styleheight-30px-display-inline-transform-translatey5px-config)
18+
* [How to test ?](#how-to-test-)
1819

1920
<!-- vim-markdown-toc -->
2021

@@ -59,3 +60,17 @@ The definition of tables for the database.
5960

6061
### <img src="../assets/folder-controller.svg" style="height: 30px; display: inline; transform: translateY(5px)"> config
6162
The directory to configure the connection to the DataBase
63+
64+
## How to test ?
65+
To test the code on local, first you'll need to initialize the back-end.
66+
```sh
67+
git clone https://github.com/aderepas/WeekGolf
68+
cd WeekGolf/Server
69+
npm i
70+
```
71+
After that, we need to create the database
72+
```sh
73+
db_name_weekgolf='weekgolfdev'
74+
mysql -u username -p -e "CREATE DATABASE $db_name_weekgolf; USE $db_name_weekgolf; source src/db/DEV.sql;"
75+
mysql -u username -p "$db_name_weekgolf" < src/db/sample.sql
76+
```

0 commit comments

Comments
 (0)