From 054450a137a8dfd718f0e05cbacfb2a511818ca7 Mon Sep 17 00:00:00 2001 From: KeRioo Date: Mon, 14 Oct 2019 14:21:26 +0200 Subject: [PATCH] Update README.md Added missing spaces and syntax highlight tags. --- README.md | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 38b1564..e50d6cc 100644 --- a/README.md +++ b/README.md @@ -5,9 +5,9 @@ This is a simple REST API with node and express with mysql Database - SQL Injection cleaning - Easy to setup -##To setup a DB file first +## To setup a DB file first -``` +```javascript db.port = 9686; //Authentication @@ -21,7 +21,7 @@ db.table_prefix = ''; ``` -##Create a values in Table (POST) +## Create a values in Table (POST) Create a new entry in the table with the parameters that are posted. @@ -37,7 +37,7 @@ POST http://localhost:9686/api/database_table } ``` - If parameters are missing : -``` +```json { "success": 0, "message": "Parameters missing" @@ -45,7 +45,7 @@ POST http://localhost:9686/api/database_table ``` -##GET all values in Table (GET) +## GET all values in Table (GET) Read Entire Table. @@ -60,18 +60,16 @@ GET http://localhost:9686/api/database_table/<% -inserted_id- %> ``` **Response** - If data exsists : -``` +```json { "success": 1, "data": "..." } ``` - If data missing : -``` +```json { "success": 0, "message": "No rows found" } ``` - -