Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update README.md #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 7 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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.

Expand All @@ -37,15 +37,15 @@ POST http://localhost:9686/api/database_table
}
```
- If parameters are missing :
```
```json
{
"success": 0,
"message": "Parameters missing"
}
```


##GET all values in Table (GET)
## GET all values in Table (GET)

Read Entire Table.

Expand All @@ -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"
}
```