@@ -34,7 +34,7 @@ There are also proof-of-concept ports of this script that only support basic RES
34
34
35
35
## Installation
36
36
37
- This is a single file application! Upload "api.php" somewhere and enjoy!
37
+ This is a single file application! Upload "` api.php ` " somewhere and enjoy!
38
38
39
39
For local development you may run PHP's built-in web server:
40
40
@@ -48,7 +48,7 @@ Dont forget to modify the configuration at the bottom of the file.
48
48
49
49
## Configuration
50
50
51
- Edit the following lines in the bottom of the file "api.php":
51
+ Edit the following lines in the bottom of the file "` api.php ` ":
52
52
53
53
$config = new Config([
54
54
'username' => 'xxx',
@@ -58,27 +58,27 @@ Edit the following lines in the bottom of the file "api.php":
58
58
59
59
These are all the configuration options and their default value between brackets:
60
60
61
- - "driver": "mysql" (default), "pgsql" or "sqlsrv"
62
- - "address": Hostname of the database server ("localhost")
61
+ - "driver": "` mysql ` " (default), "` pgsql ` " or "` sqlsrv ` "
62
+ - "address": Hostname of the database server ("` localhost ` ")
63
63
- "port": TCP port of the database server (defaults to driver default)
64
64
- "username": Username of the user connecting to the database (no default)
65
65
- "password": Password of the user connecting to the database (no default)
66
66
- "database": Database the connecting is made to (no default)
67
- - "middlewares": List of middlewares to load ("cors")
68
- - "controllers": List of controllers to load ("records,openapi")
69
- - "openApiBase": OpenAPI info ("{"info":{"title":"PHP-CRUD-API","version":"1.0.0"}}")
70
- - "cacheType": "TempFile" (default), "Redis", "Memcache", "Memcached" or "NoCache"
67
+ - "middlewares": List of middlewares to load ("` cors ` ")
68
+ - "controllers": List of controllers to load ("` records,openapi ` ")
69
+ - "openApiBase": OpenAPI info ("` {"info":{"title":"PHP-CRUD-API","version":"1.0.0"}} ` ")
70
+ - "cacheType": "` TempFile ` " (default), "` Redis ` ", "` Memcache ` ", "` Memcached ` " or "` NoCache ` "
71
71
- "cachePath": Path/address of the cache (defaults to system's "temp" directory)
72
- - "cacheTime": Number of seconds the cache is valid (10 )
73
- - "debug": Show errors in the "X-Debug-Info" header (false)
72
+ - "cacheTime": Number of seconds the cache is valid (" ` 10 ` " )
73
+ - "debug": Show errors in the "X-Debug-Info" header (" ` false ` " )
74
74
75
75
## Compilation
76
76
77
- The code resides in the "src" directory. You can access it at the URL:
77
+ The code resides in the "` src ` " directory. You can access it at the URL:
78
78
79
79
http://localhost:8080/src/records/posts/1
80
80
81
- You can compile all files into a single "api.php" file using:
81
+ You can compile all files into a single "` api.php ` " file using:
82
82
83
83
php build.php
84
84
0 commit comments