Skip to content

Commit

Permalink
feat: uses Postgres database
Browse files Browse the repository at this point in the history
  • Loading branch information
ghoshnirmalya committed Aug 27, 2020
1 parent 329dc81 commit 2a373b9
Show file tree
Hide file tree
Showing 31 changed files with 318 additions and 1,290 deletions.
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
**/.DS_STORE
node_modules
**/node_modules
.next
**/.env
out
**/*.pem
.vercel
**/backend/data
**/.cache
backend/data
backend/build
52 changes: 0 additions & 52 deletions backend/api/feed/config/routes.json

This file was deleted.

8 changes: 0 additions & 8 deletions backend/api/feed/controllers/feed.js

This file was deleted.

8 changes: 0 additions & 8 deletions backend/api/feed/models/feed.js

This file was deleted.

20 changes: 0 additions & 20 deletions backend/api/feed/models/feed.settings.json

This file was deleted.

8 changes: 0 additions & 8 deletions backend/api/feed/services/feed.js

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
18 changes: 18 additions & 0 deletions backend/app/config/database.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
module.exports = ({ env }) => ({
defaultConnection: "default",
connections: {
default: {
connector: "bookshelf",
settings: {
client: "postgres",
host: env("DATABASE_HOST", "postgres"),
port: env.int("DATABASE_PORT", 5432),
database: env("DATABASE_NAME", "strapi"),
username: env("DATABASE_USERNAME", "strapi"),
password: env("DATABASE_PASSWORD", "strapi"),
ssl: env.bool("DATABASE_SSL", false),
},
options: {},
},
},
});
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
'use strict';
"use strict";

/**
* An asynchronous bootstrap function that runs before
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
'use strict';
"use strict";

/**
* Cron config that gives you an opportunity
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
'use strict';
"use strict";

module.exports = async (/* ctx */) => {
// return ctx.notFound('My custom message 404');
Expand Down
9 changes: 9 additions & 0 deletions backend/app/config/server.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
module.exports = ({ env }) => ({
host: env("HOST", "0.0.0.0"),
port: env.int("PORT", 1337),
admin: {
auth: {
secret: env("ADMIN_JWT_SECRET", "f7a5d80a71f9c4960ff623b5f90056a0"),
},
},
});
File renamed without changes.
3 changes: 3 additions & 0 deletions backend/app/extensions/users-permissions/config/jwt.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
jwtSecret: process.env.JWT_SECRET || "aa784526-bc31-4de1-8793-d334f862d2f4",
};
File renamed without changes.
15 changes: 7 additions & 8 deletions backend/package.json → backend/app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,24 +11,23 @@
},
"devDependencies": {},
"dependencies": {
"knex": "<0.20.0",
"sqlite3": "latest",
"strapi": "3.1.4",
"strapi-admin": "3.1.4",
"strapi-connector-bookshelf": "3.1.4",
"strapi-plugin-content-manager": "3.1.4",
"strapi-utils": "3.1.4",
"strapi-plugin-content-type-builder": "3.1.4",
"strapi-plugin-content-manager": "3.1.4",
"strapi-plugin-users-permissions": "3.1.4",
"strapi-plugin-email": "3.1.4",
"strapi-plugin-graphql": "3.1.4",
"strapi-plugin-upload": "3.1.4",
"strapi-plugin-users-permissions": "3.1.4",
"strapi-utils": "3.1.4"
"strapi-connector-bookshelf": "3.1.4",
"knex": "<0.20.0",
"pg": "latest"
},
"author": {
"name": "A Strapi developer"
},
"strapi": {
"uuid": "ced9ba4d-b3cc-4352-9033-da423238fc2e"
"uuid": "60e015fd-285b-4506-9ff8-1abb4854f4da"
},
"engines": {
"node": ">=10.0.0",
Expand Down
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit 2a373b9

Please sign in to comment.