Skip to content

Commit 379456d

Browse files
committed
Initialises the API with some baseline funcitonality
1 parent 49c89ad commit 379456d

38 files changed

+4065
-0
lines changed

.prettierignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
.expo
2+
.next
3+
node_modules
4+
package-lock.json
5+
docker*

.prettierrc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"trailingComma": "es5",
3+
"tabWidth": 2,
4+
"semi": false,
5+
"singleQuote": true,
6+
"printWidth": 100
7+
}

Dockerfile

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
FROM node:10.15.3
2+
3+
WORKDIR /app
4+
5+
COPY ./package.json .
6+
7+
RUN npm install
8+
9+
COPY . .
10+
11+
EXPOSE 3000
12+
13+
CMD npm start

README.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
## PG-API
2+
3+
A RESTful API for managing your Postgres. Fetch tables, add roles, and run queries (and more).
4+
5+
## Docs
6+
7+
Soon
8+
9+
## FAQs
10+
11+
**What security does this use?**
12+
13+
None right now. We are assuming you are using this behind a proxy which brings it's own security, or using this internally with no access to the outside world. We may add security in the future, but only something very basic.
14+
15+
**Can I use this on my website/client?**
16+
17+
No. Primarily because you shouldn't really query your database directly from a client unless you want to give everyone full access to your data. (Don't do it.)
18+
19+
## Developers
20+
21+
1. Start the database using `docker-compose up`
22+
2. Run `npm run dev`
23+
3. Run `npm test` while you work
24+
25+
## Licence
26+
27+
Apache 2.0

docker-compose.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# docker-compose.yml
2+
version: "3"
3+
services:
4+
db:
5+
image: supabase/postgres
6+
ports:
7+
- "5432:5432"
8+
volumes:
9+
- ./test/postgres/mnt:/docker-entrypoint-initdb.d/
10+
environment:
11+
POSTGRES_PASSWORD: postgres
12+

0 commit comments

Comments
 (0)