Skip to content
This repository was archived by the owner on Jan 20, 2020. It is now read-only.

Commit 6435f0b

Browse files
author
Luciano Nooijen
committed
Knex setup
1 parent 4e701f1 commit 6435f0b

File tree

6 files changed

+86
-8
lines changed

6 files changed

+86
-8
lines changed

.eslintignore

+2
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,5 @@
66
/docs/**
77
/jsdoc/**
88
.next/**
9+
/coverage/**
10+
/jest.config.js

.prettierrc

+1-3
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,5 @@
55
"singleQuote": true,
66
"trailingComma": "all",
77
"jsxBracketSameLine": false,
8-
"parser": "babylon",
9-
"noSemi": true,
10-
"rcVerbose": true
8+
"parser": "babylon"
119
}

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ POST routes are protected
1818

1919
# Todo
2020

21-
* Add TDD configuration
21+
* Add TDD configuration, with SQLite for testing purposes
2222
* Create Restify/Express server
2323
* See if https://github.com/Vincit/knex-db-manager might be a viable option
2424
* Integrate Helmet or similar

knexfile.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Update with your config settings.
1+
require('dotenv').config();
22

33
// eslint-disable-next-line
44
const {
@@ -9,7 +9,7 @@ const {
99
DB_PASS,
1010
} = process.env;
1111

12-
module.export = {
12+
module.exports = {
1313
client: DB_CLIENT,
1414
connection: {
1515
host: DB_HOST,

package.json

+1
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
"dependencies": {
2323
"dotenv": "^6.1.0",
2424
"knex": "^0.15.2",
25+
"pg": "^7.6.0",
2526
"sqreen": "^1.26.2",
2627
"yarn": "^1.12.1"
2728
},

yarn.lock

+79-2
Original file line numberDiff line numberDiff line change
@@ -710,6 +710,11 @@ buffer-from@^1.0.0:
710710
resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.1.tgz#32713bc028f75c02fdb710d7c7bcec1f2c6070ef"
711711
integrity sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==
712712

713+
buffer-writer@1.0.1:
714+
version "1.0.1"
715+
resolved "https://registry.yarnpkg.com/buffer-writer/-/buffer-writer-1.0.1.tgz#22a936901e3029afcd7547eb4487ceb697a3bf08"
716+
integrity sha1-Iqk2kB4wKa/NdUfrRIfOtpejvwg=
717+
713718
builtin-modules@^1.0.0:
714719
version "1.1.1"
715720
resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-1.1.1.tgz#270f076c5a72c02f5b65a47df94c5fe3a278892f"
@@ -4150,6 +4155,11 @@ package-json@^4.0.0:
41504155
registry-url "^3.0.3"
41514156
semver "^5.1.0"
41524157

4158+
packet-reader@0.3.1:
4159+
version "0.3.1"
4160+
resolved "https://registry.yarnpkg.com/packet-reader/-/packet-reader-0.3.1.tgz#cd62e60af8d7fea8a705ec4ff990871c46871f27"
4161+
integrity sha1-zWLmCvjX/qinBexP+ZCHHEaHHyc=
4162+
41534163
parse-filepath@^0.6.1:
41544164
version "0.6.3"
41554165
resolved "https://registry.yarnpkg.com/parse-filepath/-/parse-filepath-0.6.3.tgz#38e17a73e5e4e6776bae9506fc3ccb14bc3a2b80"
@@ -4285,11 +4295,51 @@ performance-now@^2.1.0:
42854295
resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b"
42864296
integrity sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=
42874297

4298+
pg-connection-string@0.1.3:
4299+
version "0.1.3"
4300+
resolved "https://registry.yarnpkg.com/pg-connection-string/-/pg-connection-string-0.1.3.tgz#da1847b20940e42ee1492beaf65d49d91b245df7"
4301+
integrity sha1-2hhHsglA5C7hSSvq9l1J2RskXfc=
4302+
42884303
pg-connection-string@2.0.0:
42894304
version "2.0.0"
42904305
resolved "https://registry.yarnpkg.com/pg-connection-string/-/pg-connection-string-2.0.0.tgz#3eefe5997e06d94821e4d502e42b6a1c73f8df82"
42914306
integrity sha1-Pu/lmX4G2Ugh5NUC5CtqHHP434I=
42924307

4308+
pg-pool@~2.0.3:
4309+
version "2.0.3"
4310+
resolved "https://registry.yarnpkg.com/pg-pool/-/pg-pool-2.0.3.tgz#c022032c8949f312a4f91fb6409ce04076be3257"
4311+
integrity sha1-wCIDLIlJ8xKk+R+2QJzgQHa+Mlc=
4312+
4313+
pg-types@~1.12.1:
4314+
version "1.12.1"
4315+
resolved "https://registry.yarnpkg.com/pg-types/-/pg-types-1.12.1.tgz#d64087e3903b58ffaad279e7595c52208a14c3d2"
4316+
integrity sha1-1kCH45A7WP+q0nnnWVxSIIoUw9I=
4317+
dependencies:
4318+
postgres-array "~1.0.0"
4319+
postgres-bytea "~1.0.0"
4320+
postgres-date "~1.0.0"
4321+
postgres-interval "^1.1.0"
4322+
4323+
pg@^7.6.0:
4324+
version "7.6.0"
4325+
resolved "https://registry.yarnpkg.com/pg/-/pg-7.6.0.tgz#0c9ecaf0ce6f3c7e3c68ce8f621df79e741a89e3"
4326+
integrity sha512-INUjsobS7O0Slad6fVlSSSVpMd5wozwtdSrWL5/JfEGYCWtPwgka0uQOf2KCo7QbWUmwefcuNQtzijeztDquQg==
4327+
dependencies:
4328+
buffer-writer "1.0.1"
4329+
packet-reader "0.3.1"
4330+
pg-connection-string "0.1.3"
4331+
pg-pool "~2.0.3"
4332+
pg-types "~1.12.1"
4333+
pgpass "1.x"
4334+
semver "4.3.2"
4335+
4336+
pgpass@1.x:
4337+
version "1.0.2"
4338+
resolved "https://registry.yarnpkg.com/pgpass/-/pgpass-1.0.2.tgz#2a7bb41b6065b67907e91da1b07c1847c877b306"
4339+
integrity sha1-Knu0G2BltnkH6R2hsHwYR8h3swY=
4340+
dependencies:
4341+
split "^1.0.0"
4342+
42934343
pify@^2.0.0:
42944344
version "2.3.0"
42954345
resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c"
@@ -4341,6 +4391,28 @@ posix-character-classes@^0.1.0:
43414391
resolved "https://registry.yarnpkg.com/posix-character-classes/-/posix-character-classes-0.1.1.tgz#01eac0fe3b5af71a2a6c02feabb8c1fef7e00eab"
43424392
integrity sha1-AerA/jta9xoqbAL+q7jB/vfgDqs=
43434393

4394+
postgres-array@~1.0.0:
4395+
version "1.0.3"
4396+
resolved "https://registry.yarnpkg.com/postgres-array/-/postgres-array-1.0.3.tgz#c561fc3b266b21451fc6555384f4986d78ec80f5"
4397+
integrity sha512-5wClXrAP0+78mcsNX3/ithQ5exKvCyK5lr5NEEEeGwwM6NJdQgzIJBVxLvRW+huFpX92F2QnZ5CcokH0VhK2qQ==
4398+
4399+
postgres-bytea@~1.0.0:
4400+
version "1.0.0"
4401+
resolved "https://registry.yarnpkg.com/postgres-bytea/-/postgres-bytea-1.0.0.tgz#027b533c0aa890e26d172d47cf9ccecc521acd35"
4402+
integrity sha1-AntTPAqokOJtFy1Hz5zOzFIazTU=
4403+
4404+
postgres-date@~1.0.0:
4405+
version "1.0.3"
4406+
resolved "https://registry.yarnpkg.com/postgres-date/-/postgres-date-1.0.3.tgz#e2d89702efdb258ff9d9cee0fe91bd06975257a8"
4407+
integrity sha1-4tiXAu/bJY/52c7g/pG9BpdSV6g=
4408+
4409+
postgres-interval@^1.1.0:
4410+
version "1.1.2"
4411+
resolved "https://registry.yarnpkg.com/postgres-interval/-/postgres-interval-1.1.2.tgz#bf71ff902635f21cb241a013fc421d81d1db15a9"
4412+
integrity sha512-fC3xNHeTskCxL1dC8KOtxXt7YeFmlbTYtn7ul8MkVERuTmf7pI4DrkAxcw3kh1fQ9uz4wQmd03a1mRiXUZChfQ==
4413+
dependencies:
4414+
xtend "^4.0.0"
4415+
43444416
prelude-ls@~1.1.2:
43454417
version "1.1.2"
43464418
resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54"
@@ -4841,6 +4913,11 @@ semver-diff@^2.0.0:
48414913
resolved "https://registry.yarnpkg.com/semver/-/semver-5.6.0.tgz#7e74256fbaa49c75aa7c7a205cc22799cac80004"
48424914
integrity sha512-RS9R6R35NYgQn++fkDWaOmqGoj4Ek9gGs+DPxNUZKuwE183xjJroKvyo1IzVFeXvUrvmALy6FWD5xrdJT25gMg==
48434915

4916+
semver@4.3.2:
4917+
version "4.3.2"
4918+
resolved "https://registry.yarnpkg.com/semver/-/semver-4.3.2.tgz#c7a07158a80bedd052355b770d82d6640f803be7"
4919+
integrity sha1-x6BxWKgL7dBSNVt3DYLWZA+AO+c=
4920+
48444921
semver@5.5.0:
48454922
version "5.5.0"
48464923
resolved "https://registry.yarnpkg.com/semver/-/semver-5.5.0.tgz#dc4bbc7a6ca9d916dee5d43516f0092b58f7b8ab"
@@ -5027,7 +5104,7 @@ split-string@^3.0.1, split-string@^3.0.2:
50275104
dependencies:
50285105
extend-shallow "^3.0.0"
50295106

5030-
split@^1.0.1:
5107+
split@^1.0.0, split@^1.0.1:
50315108
version "1.0.1"
50325109
resolved "https://registry.yarnpkg.com/split/-/split-1.0.1.tgz#605bd9be303aa59fb35f9229fbea0ddec9ea07d9"
50335110
integrity sha512-mTyOoPbrivtXnwnIxZRFYRrPNtEFKlpB2fvjSnCQUiAA6qAZzqwna5envK4uk6OIeP17CsdF3rSBGYVBsU0Tkg==
@@ -5712,7 +5789,7 @@ xml-name-validator@^3.0.0:
57125789
resolved "https://registry.yarnpkg.com/xml-name-validator/-/xml-name-validator-3.0.0.tgz#6ae73e06de4d8c6e47f9fb181f78d648ad457c6a"
57135790
integrity sha512-A5CUptxDsvxKJEU3yO6DuWBSJz/qizqzJKOMIfUJHETbBw/sFaDxgd6fxm1ewUaM0jZ444Fc5vC5ROYurg/4Pw==
57145791

5715-
xtend@~4.0.1:
5792+
xtend@^4.0.0, xtend@~4.0.1:
57165793
version "4.0.1"
57175794
resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.1.tgz#a5c6d532be656e23db820efb943a1f04998d63af"
57185795
integrity sha1-pcbVMr5lbiPbgg77lDofBJmNY68=

0 commit comments

Comments
 (0)