This file contains hidden or 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
| function searchBlogByTitle(query: string, itemsPerPage: number, lastEvaluatedKey?: string): Promise<any> { | |
| const FIXED_ID_FOR_SEARCH_GSI = "1233421345223"; | |
| let params: AWS.DynamoDB.DocumentClient.QueryInput = { | |
| TableName: "Blog", | |
| IndexName: "BlogSearch", | |
| KeyConditionExpression: "fixedIdForSearchGSI = :pkv", | |
| FilterExpression: "contains(titleInLowerCase, :titleV)", | |
| ExpressionAttributeValues: { | |
| ":pkv": FIXED_ID_FOR_SEARCH_GSI, | |
| ":titleV": query.toLocaleLowerCase() |
This file contains hidden or 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
| // we have an async "initialize" method that performs several calls consecutively. | |
| // after each step in the async chain, we might have been unmounted already | |
| // and performing any further calls becomes obsolete | |
| class DefaultComponent extends React.Component { | |
| // ... | |
| componentDidMount() { | |
| this._isMounted = true; | |
| this.initialize(); | |
| } | |
| componentWillUnmount() { |
This file contains hidden or 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
| <html> | |
| <head> | |
| <meta charset="utf-8" /> | |
| <meta http-equiv="Access-Control-Allow-Origin" content="*"> | |
| <title>Big Nerd</title> | |
| <header name = "Access-Control-Allow-Origin" value = "*" /> | |
| </head> |
This file contains hidden or 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
| # the IP(s) on which your node server is running. I chose port 3000. | |
| upstream app_geoforce { | |
| server 127.0.0.1:3000; | |
| } | |
| upstream app_pcodes{ | |
| server 127.0.0.1:3001; | |
| } |