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
| component { | |
| boolean function onRequestStart( required string targetPage ) { | |
| var headers = getHttpRequestData().headers; | |
| var origin = ''; | |
| var PC = getpagecontext().getresponse(); | |
| // Find the Origin of the request | |
| if( structKeyExists( headers, 'Origin' ) ) { |
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
| const character = { | |
| name: 'Latisha', | |
| isMoving: true, | |
| }; | |
| const myCharacter = { | |
| name: 'Latisha', | |
| move: true, | |
| }; |
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
| if(character.isMoving) { | |
| } | |
| if(myCharacter.move) { | |
| } |
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
| { | |
| status: 0 | |
| } |
In JavaScript projects, I used to use dotenv so that I could put local environment variables in a .env file for local development. But dotenv requires you to add code to your project.
With direnv, you can put local env vars in a .envrc file and those env vars are loaded automatically in the shell.
For these steps, it is assummed that you have installed Git Bash on Windows. I also use VSCode as my editor.
- Create a folder such as
c:\toolsto put thedirenv.exefile and add it to the Windows PATH