Showing
3 changed files
with
148 additions
and
47 deletions
... | @@ -17,24 +17,17 @@ | ... | @@ -17,24 +17,17 @@ |
17 | *** for contributors-url, forks-url, etc. This is an optional, concise syntax you may use. | 17 | *** for contributors-url, forks-url, etc. This is an optional, concise syntax you may use. |
18 | *** https://www.markdownguide.org/basic-syntax/#reference-style-links | 18 | *** https://www.markdownguide.org/basic-syntax/#reference-style-links |
19 | --> | 19 | --> |
20 | -[![Contributors][contributors-shield]][contributors-url] | ||
21 | -[![Forks][forks-shield]][forks-url] | ||
22 | -[![Stargazers][stars-shield]][stars-url] | ||
23 | -[![Issues][issues-shield]][issues-url] | ||
24 | -[![MIT License][license-shield]][license-url] | ||
25 | -[![LinkedIn][linkedin-shield]][linkedin-url] | ||
26 | - | ||
27 | - | ||
28 | 20 | ||
29 | <!-- PROJECT LOGO --> | 21 | <!-- PROJECT LOGO --> |
30 | <br /> | 22 | <br /> |
31 | 23 | ||
32 | <div align="center"> | 24 | <div align="center"> |
33 | - <a href="https://github.com/github_username/repo_name"> | 25 | + <a href="http://khuhub.khu.ac.kr/2021105619/learn-in-web-backend"> |
34 | - <img src="images/logo.png" alt="Logo" width="80" height="80"> | 26 | + <img src="logo.svg" alt="Logo" width="80" height="80"> |
35 | </a> | 27 | </a> |
36 | <h3 align="center">Learn In Web(Backend)</h3> | 28 | <h3 align="center">Learn In Web(Backend)</h3> |
37 | 29 | ||
30 | + | ||
38 | <p align="center"> | 31 | <p align="center"> |
39 | NestJS Backend for | 32 | NestJS Backend for |
40 | <a href="http://khuhub.khu.ac.kr/2021105619/learn-in-web-backend"><strong>Learn In Web</strong></a> | 33 | <a href="http://khuhub.khu.ac.kr/2021105619/learn-in-web-backend"><strong>Learn In Web</strong></a> |
... | @@ -74,7 +67,6 @@ | ... | @@ -74,7 +67,6 @@ |
74 | <li><a href="#contributing">Contributing</a></li> | 67 | <li><a href="#contributing">Contributing</a></li> |
75 | <li><a href="#license">License</a></li> | 68 | <li><a href="#license">License</a></li> |
76 | <li><a href="#contact">Contact</a></li> | 69 | <li><a href="#contact">Contact</a></li> |
77 | - <li><a href="#acknowledgments">Acknowledgments</a></li> | ||
78 | </ol> | 70 | </ol> |
79 | </details> | 71 | </details> |
80 | 72 | ||
... | @@ -83,7 +75,7 @@ | ... | @@ -83,7 +75,7 @@ |
83 | <!-- ABOUT THE PROJECT --> | 75 | <!-- ABOUT THE PROJECT --> |
84 | ## About The Project | 76 | ## About The Project |
85 | 77 | ||
86 | -[![Product Name Screen Shot][product-screenshot]](https://example.com) | 78 | +[![Product Name Screen Shot][product-screenshot]](https://code.sungjin.dev) |
87 | 79 | ||
88 | This project allows users to run codes and study without any IDE. This project focusd on schools, and students for study. | 80 | This project allows users to run codes and study without any IDE. This project focusd on schools, and students for study. |
89 | 81 | ||
... | @@ -121,7 +113,7 @@ This is an example of how to list things you need to use the software and how to | ... | @@ -121,7 +113,7 @@ This is an example of how to list things you need to use the software and how to |
121 | ``` | 113 | ``` |
122 | 114 | ||
123 | * Compiler for languages | 115 | * Compiler for languages |
124 | - | 116 | + |
125 | ```sh | 117 | ```sh |
126 | #For typescript | 118 | #For typescript |
127 | npm install -g ts-node | 119 | npm install -g ts-node |
... | @@ -131,10 +123,10 @@ This is an example of how to list things you need to use the software and how to | ... | @@ -131,10 +123,10 @@ This is an example of how to list things you need to use the software and how to |
131 | sudo yum update && sudo yum install golang build-essential | 123 | sudo yum update && sudo yum install golang build-essential |
132 | #Other | 124 | #Other |
133 | #install golang, cpp, c++ manually. | 125 | #install golang, cpp, c++ manually. |
134 | - ``` | 126 | + ``` |
135 | - | 127 | + |
136 | * Docker, postgreSQL Database | 128 | * Docker, postgreSQL Database |
137 | - | 129 | + |
138 | (You can manually change port, name, etc if you want.) | 130 | (You can manually change port, name, etc if you want.) |
139 | 131 | ||
140 | ```sh | 132 | ```sh |
... | @@ -142,9 +134,9 @@ This is an example of how to list things you need to use the software and how to | ... | @@ -142,9 +134,9 @@ This is an example of how to list things you need to use the software and how to |
142 | docker pull postgres | 134 | docker pull postgres |
143 | docker run -d -p 5432:5432 --name postgres-container -e POSTGRES_PASSWORD=Your_Password -v ~/pgdata:/Location_to_save_data/ postgres | 135 | docker run -d -p 5432:5432 --name postgres-container -e POSTGRES_PASSWORD=Your_Password -v ~/pgdata:/Location_to_save_data/ postgres |
144 | ``` | 136 | ``` |
137 | + | ||
145 | 138 | ||
146 | - | 139 | + |
147 | - | ||
148 | * Installation | 140 | * Installation |
149 | 141 | ||
150 | 1. Clone the repo | 142 | 1. Clone the repo |
... | @@ -159,7 +151,7 @@ This is an example of how to list things you need to use the software and how to | ... | @@ -159,7 +151,7 @@ This is an example of how to list things you need to use the software and how to |
159 | 151 | ||
160 | 3. Enter your DB URL in `.env` | 152 | 3. Enter your DB URL in `.env` |
161 | ```js | 153 | ```js |
162 | - DATABASE_URL="postgresql://_User:_Password@localhost:5432/postgres"" | 154 | + DATABASE_URL="postgresql://_User:_Password@localhost:5432/postgres" |
163 | ``` | 155 | ``` |
164 | 156 | ||
165 | 4. Migrate DB | 157 | 4. Migrate DB |
... | @@ -186,7 +178,139 @@ This is an example of how to list things you need to use the software and how to | ... | @@ -186,7 +178,139 @@ This is an example of how to list things you need to use the software and how to |
186 | 178 | ||
187 | To Use Learn In Web, you need to use this backend; this project communicate via RESTful API. | 179 | To Use Learn In Web, you need to use this backend; this project communicate via RESTful API. |
188 | 180 | ||
189 | -_For More Useage, please see frontend [Demo](http://khuhub.khu.ac.kr/2021105619/learn_in_web)_ | 181 | +-API- |
182 | + | ||
183 | +```json | ||
184 | +POST /auth/signup | ||
185 | +{ | ||
186 | + "name" : "name", | ||
187 | + "email" : "email", | ||
188 | + "password" : "password" | ||
189 | +} | ||
190 | +``` | ||
191 | + | ||
192 | +```json | ||
193 | +POST /auth/signin | ||
194 | +{ | ||
195 | + "email" : "email", | ||
196 | + "password" : "password" | ||
197 | +} | ||
198 | +``` | ||
199 | + | ||
200 | +```json | ||
201 | +POST /auth/refresh | ||
202 | +{ | ||
203 | + "token" : "token_madeby_signup_or_signin" | ||
204 | +} | ||
205 | +``` | ||
206 | + | ||
207 | +```json | ||
208 | +POST /auth/validate | ||
209 | +{ | ||
210 | + "token" : "token_madeby_signup_or_signin" | ||
211 | +} | ||
212 | +``` | ||
213 | + | ||
214 | +```json | ||
215 | +POST /post | ||
216 | +{ | ||
217 | + "token" : "token", | ||
218 | + "title" : "title", | ||
219 | + "privat" : true, | ||
220 | + "explain" : "explain of problem", | ||
221 | + "testinput" : ["1", "2"], | ||
222 | + "testoutput" : ["3", "4"], | ||
223 | + "difficulty" : 1 | ||
224 | +} | ||
225 | +``` | ||
226 | + | ||
227 | +```json | ||
228 | +PUT /post | ||
229 | +{ | ||
230 | + "token" : "token", | ||
231 | + "title" : "title", | ||
232 | + "privat" : true, | ||
233 | + "explain" : "explain of problem", | ||
234 | + "testinput" : ["1", "2"], | ||
235 | + "testoutput" : ["3", "4"], | ||
236 | + "difficulty" : 1 | ||
237 | +} | ||
238 | +``` | ||
239 | + | ||
240 | +```json | ||
241 | +GET /post | ||
242 | +``` | ||
243 | + | ||
244 | +```json | ||
245 | + | ||
246 | +GET /post/some | ||
247 | +{ | ||
248 | + "take" : 20 | ||
249 | +} | ||
250 | +``` | ||
251 | + | ||
252 | +``` | ||
253 | +GET /post/id/:id | ||
254 | +use integer param for :id | ||
255 | +``` | ||
256 | + | ||
257 | +``` | ||
258 | +GET /post/difficulty/:level | ||
259 | +use integer param for :level | ||
260 | +``` | ||
261 | + | ||
262 | +```json | ||
263 | +POST /post/like/:id | ||
264 | +use integer param for :id | ||
265 | +{ | ||
266 | + "token" : "token" | ||
267 | +} | ||
268 | +``` | ||
269 | + | ||
270 | +```json | ||
271 | +DELETE /post | ||
272 | +``` | ||
273 | + | ||
274 | +```json | ||
275 | +POST /comment/:id | ||
276 | +use integer param for :id | ||
277 | +{ | ||
278 | + "token" : "token", | ||
279 | + "content" : "content of comment" | ||
280 | +} | ||
281 | +``` | ||
282 | + | ||
283 | +```json | ||
284 | +DELETE /comment/:id | ||
285 | +use integer param for :id | ||
286 | +{ | ||
287 | + "token" : "token" | ||
288 | +} | ||
289 | +``` | ||
290 | + | ||
291 | +```json | ||
292 | +GET /comment/:id | ||
293 | +use integer param for :id | ||
294 | +``` | ||
295 | + | ||
296 | +```json | ||
297 | +POST /search | ||
298 | +{ | ||
299 | + "search" : "search item divided by black" | ||
300 | +} | ||
301 | +``` | ||
302 | + | ||
303 | +```json | ||
304 | +POST /runner | ||
305 | +{ | ||
306 | + "token" : "token", | ||
307 | + "input" : ["input", "data", "array", "does not working now"], | ||
308 | + "type" : "cpp", | ||
309 | + "code" : "//example code\n#include <iostream> ~~~~" | ||
310 | +} | ||
311 | +``` | ||
312 | + | ||
313 | +_For Real Useage, please see frontend [Frontend_URL](http://khuhub.khu.ac.kr/2021105619/learn_in_web)_ | ||
190 | 314 | ||
191 | <p align="right">(<a href="#top">back to top</a>)</p> | 315 | <p align="right">(<a href="#top">back to top</a>)</p> |
192 | 316 | ||
... | @@ -232,7 +356,7 @@ Don't forget to give the project a star! Thanks again! | ... | @@ -232,7 +356,7 @@ Don't forget to give the project a star! Thanks again! |
232 | <!-- LICENSE --> | 356 | <!-- LICENSE --> |
233 | ## License | 357 | ## License |
234 | 358 | ||
235 | -Distributed under the MIT License. See `LICENSE.txt` for more information. | 359 | +Distributed under the MIT License. |
236 | 360 | ||
237 | <p align="right">(<a href="#top">back to top</a>)</p> | 361 | <p align="right">(<a href="#top">back to top</a>)</p> |
238 | 362 | ||
... | @@ -241,37 +365,13 @@ Distributed under the MIT License. See `LICENSE.txt` for more information. | ... | @@ -241,37 +365,13 @@ Distributed under the MIT License. See `LICENSE.txt` for more information. |
241 | <!-- CONTACT --> | 365 | <!-- CONTACT --> |
242 | ## Contact | 366 | ## Contact |
243 | 367 | ||
244 | -Your Name - [@taintlesscupcake](https://instagram.com/taintless_cupcake) - [email](mailto:me@sungjin.dev) | 368 | +SungJin - [@taintlesscupcake](https://instagram.com/taintless_cupcake) - [email](mailto:me@sungjin.dev) |
245 | 369 | ||
246 | Project Link: [http://khuhub.khu.ac.kr/2021105619/learn-in-web-backend](http://khuhub.khu.ac.kr/2021105619/learn-in-web-backend) | 370 | Project Link: [http://khuhub.khu.ac.kr/2021105619/learn-in-web-backend](http://khuhub.khu.ac.kr/2021105619/learn-in-web-backend) |
247 | 371 | ||
248 | <p align="right">(<a href="#top">back to top</a>)</p> | 372 | <p align="right">(<a href="#top">back to top</a>)</p> |
249 | 373 | ||
250 | - | ||
251 | - | ||
252 | -<!-- ACKNOWLEDGMENTS --> | ||
253 | -## Acknowledgments | ||
254 | - | ||
255 | -* []() | ||
256 | -* []() | ||
257 | -* []() | ||
258 | - | ||
259 | <p align="right">(<a href="#top">back to top</a>)</p> | 374 | <p align="right">(<a href="#top">back to top</a>)</p> |
260 | 375 | ||
261 | 376 | ||
262 | - | 377 | +[product-screenshot]: screenshot.png |
263 | -<!-- MARKDOWN LINKS & IMAGES --> | ||
264 | -<!-- https://www.markdownguide.org/basic-syntax/#reference-style-links --> | ||
265 | -[contributors-shield]: https://img.shields.io/github/contributors/github_username/repo_name.svg?style=for-the-badge | ||
266 | -[contributors-url]: https://github.com/github_username/repo_name/graphs/contributors | ||
267 | -[forks-shield]: https://img.shields.io/github/forks/github_username/repo_name.svg?style=for-the-badge | ||
268 | -[forks-url]: https://github.com/github_username/repo_name/network/members | ||
269 | -[stars-shield]: https://img.shields.io/github/stars/github_username/repo_name.svg?style=for-the-badge | ||
270 | -[stars-url]: https://github.com/github_username/repo_name/stargazers | ||
271 | -[issues-shield]: https://img.shields.io/github/issues/github_username/repo_name.svg?style=for-the-badge | ||
272 | -[issues-url]: https://github.com/github_username/repo_name/issues | ||
273 | -[license-shield]: https://img.shields.io/github/license/github_username/repo_name.svg?style=for-the-badge | ||
274 | -[license-url]: https://github.com/github_username/repo_name/blob/master/LICENSE.txt | ||
275 | -[linkedin-shield]: https://img.shields.io/badge/-LinkedIn-black.svg?style=for-the-badge&logo=linkedin&colorB=555 | ||
276 | -[linkedin-url]: https://linkedin.com/in/linkedin_username | ||
277 | -[product-screenshot]: images/screenshot.png | ... | ... |
logo.svg
0 → 100644
1 | +<svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" viewBox="0 0 20 20" fill="currentColor"><path fill-rule="evenodd" d="M2 5a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5zm3.293 1.293a1 1 0 0 1 1.414 0l3 3a1 1 0 0 1 0 1.414l-3 3a1 1 0 0 1-1.414-1.414L7.586 10 5.293 7.707a1 1 0 0 1 0-1.414zM11 12a1 1 0 1 0 0 2h3a1 1 0 1 0 0-2h-3z" clip-rule="evenodd"/></svg> | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
screenshot.png
0 → 100644

211 KB
-
Please register or login to post a comment