Skip to content

Instantly share code, notes, and snippets.

View viktorfa's full-sized avatar

Viktor Andersen viktorfa

  • Trondheim
View GitHub Profile
// config/database.js
const getDatabaseConfig = ({ env }) => {
if (
env("IS_OFFLINE", null) === "true" ||
env("LAMBDA_RUNTIME_DIR", null) === null
) {
// In local simulated Lambda or normal Strapi
return {
connector: "mongoose",
// config/plugins.js
module.exports = ({ env }) => ({
upload: {
provider: "aws-s3",
providerOptions: {
params: {
Bucket: env("BUCKET_NAME"),
},
},
@viktorfa
viktorfa / database.js
Last active August 17, 2020 09:39
Database config for Strapi in Lambda with SQLite
// config/database.js
const getDatabaseConfig = ({ env }) => {
if (
env("IS_OFFLINE", null) === "true" ||
env("LAMBDA_RUNTIME_DIR", null) === null
) {
// In local simulated Lambda or normal Strapi
return {
connector: "bookshelf",