Compare commits

..

No commits in common. "86985ef7355c2db09dcd6c8e52ee7ebde3ed4128" and "b14fa05adc1ef8e34fd73bf5f495505df7d44b33" have entirely different histories.

4 changed files with 10 additions and 13 deletions

View File

@ -2,16 +2,9 @@
All notable changes to this project will be documented in this file. Dates are displayed in UTC. All notable changes to this project will be documented in this file. Dates are displayed in UTC.
#### [0.1.3](https://git.odit.services/kauft.es/linkylinky/compare/0.1.2...0.1.3)
- Weired knex env fix [`fef7daa`](https://git.odit.services/kauft.es/linkylinky/commit/fef7daaf961e9112aa00f2ad22c3b0518ad258a7)
#### [0.1.2](https://git.odit.services/kauft.es/linkylinky/compare/0.1.1...0.1.2) #### [0.1.2](https://git.odit.services/kauft.es/linkylinky/compare/0.1.1...0.1.2)
> 14 August 2021
- API Endpoint to get all short urls [`fa01864`](https://git.odit.services/kauft.es/linkylinky/commit/fa01864d0de7921e741d63c3f5795161279ea478) - API Endpoint to get all short urls [`fa01864`](https://git.odit.services/kauft.es/linkylinky/commit/fa01864d0de7921e741d63c3f5795161279ea478)
- 🚀RELEASE 0.1.2 [`b14fa05`](https://git.odit.services/kauft.es/linkylinky/commit/b14fa05adc1ef8e34fd73bf5f495505df7d44b33)
- Changed the way that the migration get's triggered [`8fa489f`](https://git.odit.services/kauft.es/linkylinky/commit/8fa489f2bcd9d1ad63ab4581b7f3b27eee3d9038) - Changed the way that the migration get's triggered [`8fa489f`](https://git.odit.services/kauft.es/linkylinky/commit/8fa489f2bcd9d1ad63ab4581b7f3b27eee3d9038)
- Get all api endpoints [`91b25c2`](https://git.odit.services/kauft.es/linkylinky/commit/91b25c22ca035aec5cc2fdc80ca4fbb56a2f8b65) - Get all api endpoints [`91b25c2`](https://git.odit.services/kauft.es/linkylinky/commit/91b25c22ca035aec5cc2fdc80ca4fbb56a2f8b65)
- Added optional db volume to docker-compose [`7c71e94`](https://git.odit.services/kauft.es/linkylinky/commit/7c71e943041d8e3ac9dcf95cad27f2f0bc0b024c) - Added optional db volume to docker-compose [`7c71e94`](https://git.odit.services/kauft.es/linkylinky/commit/7c71e943041d8e3ac9dcf95cad27f2f0bc0b024c)

View File

@ -4,7 +4,7 @@ COPY package.json .
COPY yarn.lock . COPY yarn.lock .
RUN yarn --production --frozen-lockfile RUN yarn --production --frozen-lockfile
COPY migrations ./migrations COPY migrations ./migrations
COPY src ./src COPY src/server.js ./
COPY knexfile.js ./ COPY knexfile.js ./
RUN mkdir db RUN mkdir db
# #
@ -14,4 +14,4 @@ WORKDIR /app
COPY --from=0 /app /app COPY --from=0 /app /app
ENV NODE_ENV production ENV NODE_ENV production
EXPOSE 3000 EXPOSE 3000
ENTRYPOINT ["/bin/sh", "-c", "yarn migrate && node ./src/server.js"] ENTRYPOINT ["/bin/sh", "-c", "yarn migrate && node ./server.js"]

View File

@ -1,6 +1,6 @@
{ {
"name": "@odit/shortener-backend", "name": "@odit/shortener-backend",
"version": "0.1.3", "version": "0.1.2",
"main": "index.js", "main": "index.js",
"license": "MIT", "license": "MIT",
"private": false, "private": false,

View File

@ -15,9 +15,13 @@ let config = {
return `http://${config.domain}`; return `http://${config.domain}`;
} }
} }
const environment = process.env.NODE_ENV || 'development';
const knexConfiguration = require('../knexfile')[environment]; const knex = require('knex')({
const knex = require('knex')(knexConfiguration); client: 'sqlite3',
connection: {
filename: "./dev.sqlite3"
}
});
const authenticate = { realm: 'Short' } const authenticate = { realm: 'Short' }
fastify.register(require('fastify-basic-auth'), { validate, authenticate }); fastify.register(require('fastify-basic-auth'), { validate, authenticate });