Skip to content

Commit

Permalink
Update .gitignore and app.config.js, add environment variable in serv…
Browse files Browse the repository at this point in the history
…erless.yml
  • Loading branch information
antoinekllee committed Feb 3, 2024
1 parent 9908275 commit 80cb3da
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
node_modules
.idea
.DS_Store
backend/temp
backend/temp
5 changes: 1 addition & 4 deletions frontend/app.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,7 @@ export default {
favicon: './app/assets/fuxi-high-resolution-logo.png',
},
extra: {
apiUrl: process.env.BACKEND_HOST || '',
serviceacc: process.env.SERVICE_ACCOUNT_EMAILJS || '',
templateid: process.env.TEMPLATE_ID_EMAILJS || '',
publicapikey: process.env.PUBLIC_API_KEY_EMAILJS || '',
apiUrl: process.env.BACKEND_HOST || 'http://0.0.0.0:3000',
eas: {
projectId: process.env.EAS_PROJECTID || '',
},
Expand Down
11 changes: 8 additions & 3 deletions serverless/serverless.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,15 @@ service: fuxibackend
# Check out our docs for more details
frameworkVersion: "3"

useDotenv: true

provider:
name: aws
runtime: nodejs18.x
state: dev
# state: dev
region: ap-southeast-1
environment:
MONGO_URL: ${env:MONGO_URL}

# you can overwrite defaults here
# stage: dev
Expand All @@ -34,6 +38,7 @@ plugins:
- serverless-middleware
- serverless-offline
- serverless-offline-watcher
# - serverless-dotenv-plugin

custom:
api:
Expand Down Expand Up @@ -70,8 +75,8 @@ custom:
# - "/*"

# you can define service wide environment variables here
# environment:
# variable1: value1
# environment:
# # MONGO_URL: ${env:MONGO_URL}

# you can add packaging information here
package:
Expand Down
5 changes: 5 additions & 0 deletions serverless/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3456,6 +3456,11 @@ fs2@^0.3.9:
memoizee "^0.4.14"
type "^2.1.0"

fsevents@~2.3.2:
version "2.3.3"
resolved "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz"
integrity sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==

function-bind@^1.1.1:
version "1.1.1"
resolved "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz"
Expand Down

0 comments on commit 80cb3da

Please sign in to comment.