-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Cuong Vu
committed
May 20, 2020
1 parent
5f3ef2e
commit 5d9ddbe
Showing
9 changed files
with
116 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
const path = require('path') | ||
const yargs = require('yargs') | ||
|
||
const stage = yargs.argv.stage | ||
|
||
const listServerlessYmlFiles = [path.resolve(__dirname, '../src/search-widget/server/serverless.yml')] | ||
|
||
const deployServerless = async () => {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
...omponents/__tests__/planner-step2.test.ts → ...nts/__tests__/appointment-planner.test.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
105 changes: 105 additions & 0 deletions
105
packages/web-components/src/search-widget/server/serverless.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,105 @@ | ||
service: web-components | ||
plugins: | ||
- serverless-webpack | ||
- serverless-offline | ||
- serverless-plugin-ifelse | ||
|
||
custom: | ||
env: ${file(../../../config.json)} | ||
webpack: | ||
webpackConfig: 'webpack.config.js' | ||
includeModules: true | ||
packager: 'yarn' | ||
packagerOptions: | ||
noFrozenLockFile: false | ||
excludeFiles: src/**/*.test.ts | ||
keepOutputDirectory: true | ||
allowedHeaders: | ||
- Content-Type | ||
- X-Amz-Date | ||
- Authorization | ||
- X-Api-Key | ||
- X-Amz-Security-Token | ||
- X-Amz-User-Agent | ||
- reapit-customer | ||
|
||
provider: | ||
name: aws | ||
runtime: nodejs10.x | ||
stage: ${opt:stage, 'dev'} | ||
region: eu-west-2 | ||
apiGateway: | ||
restApiId: ${self:custom.env.GATEWAY_REST_API_ID} | ||
restApiRootResourceId: ${self:custom.env.GATEWAY_REST_API_ROOT_RESOURCE_ID} | ||
deploymentBucket: | ||
name: web-components.search-widget.${self:provider.stage} | ||
blockPublicAccess: false | ||
environment: | ||
NODE_ENV: ${self:custom.env.NODE_ENV} | ||
APP_ENV: ${self:custom.env.APP_ENV} | ||
PLATFORM_API_BASE_URL: ${self:custom.env.PLATFORM_API_BASE_URL} | ||
COGNITO_CLIENT_SECRET_SEARCH_WIDGET: ${self:custom.env.COGNITO_CLIENT_SECRET_SEARCH_WIDGET} | ||
COGNITO_CLIENT_ID_SEARCH_WIDGET: ${self:custom.env.COGNITO_CLIENT_ID_SEARCH_WIDGET} | ||
COGNITO_OAUTH_URL: ${self:custom.env.COGNITO_OAUTH_URL} | ||
package: | ||
individually: true | ||
include: | ||
- dist/** | ||
exclude: | ||
- package.json | ||
- node_modules/** | ||
- error.log | ||
- info.log | ||
- jest.config.js | ||
- serverless.yml | ||
- src/** | ||
- tsconfig.json | ||
- yml-helpers.js | ||
- public/** | ||
|
||
functions: | ||
searchWidgetHandler: | ||
handler: src/search-widget/server/core/index.searchWidgetHandler | ||
events: | ||
- http: | ||
path: properties | ||
method: get | ||
cors: | ||
origin: '*' | ||
headers: ${self:custom.allowedHeaders} | ||
allowCredentials: false | ||
private: true | ||
request: | ||
parameters: | ||
headers: | ||
api-version: false | ||
Authorization: false | ||
reapit-customer: false | ||
- http: | ||
path: properties/{id} | ||
method: get | ||
cors: | ||
origin: '*' | ||
headers: ${self:custom.allowedHeaders} | ||
allowCredentials: false | ||
private: true | ||
request: | ||
parameters: | ||
headers: | ||
api-version: false | ||
Authorization: false | ||
reapit-customer: false | ||
- http: | ||
path: propertyImages | ||
method: get | ||
cors: | ||
origin: '*' | ||
headers: ${self:custom.allowedHeaders} | ||
allowCredentials: false | ||
private: true | ||
request: | ||
parameters: | ||
headers: | ||
api-version: false | ||
Authorization: false | ||
reapit-customer: false |