-
Notifications
You must be signed in to change notification settings - Fork 3
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
1 parent
dc876d0
commit e8c4b4d
Showing
11 changed files
with
224 additions
and
360 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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,14 @@ | ||
# Automagical `public` directory | ||
|
||
The `public` directory is a great place to add (compiled) JS and CSS, images, gifs, or any other files you want to publicly accessible. | ||
|
||
Each time you deploy your Architect project (`npx deploy`), the contents of this folder will automatically be published to S3. | ||
|
||
Architect pushes the `public` directory to the `staging` and `production` S3 buckets defined in your `.arc` file's `@static` pragma. | ||
|
||
If you have not specified S3 buckets with `@static` in your project's `.arc` file, `public` directory will only be used when previewing your application locally with `npx sandbox`. | ||
|
||
|
||
## Use caution! | ||
|
||
The full contents of this folder public will be copied to S3 with each deploy, overwriting any existing S3 files with the same name. |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,7 +1,7 @@ | ||
{ | ||
"name": "loginflow-get-index", | ||
"dependencies": { | ||
"@architect/data": "^2.0.5", | ||
"@architect/functions": "^1.9.7" | ||
"@architect/data": "^2.0.8", | ||
"@architect/functions": "^1.9.12" | ||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,7 +1,7 @@ | ||
{ | ||
"name": "loginflow-get-logout", | ||
"dependencies": { | ||
"@architect/data": "^2.0.5", | ||
"@architect/functions": "^1.9.7" | ||
"@architect/data": "^2.0.8", | ||
"@architect/functions": "^1.9.12" | ||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,7 +1,7 @@ | ||
{ | ||
"name": "loginflow-get-protected", | ||
"dependencies": { | ||
"@architect/data": "^2.0.5", | ||
"@architect/functions": "^1.9.7" | ||
"@architect/data": "^2.0.8", | ||
"@architect/functions": "^1.9.12" | ||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,7 +1,7 @@ | ||
{ | ||
"name": "loginflow-post-login", | ||
"dependencies": { | ||
"@architect/data": "^2.0.5", | ||
"@architect/functions": "^1.9.7" | ||
"@architect/data": "^2.0.8", | ||
"@architect/functions": "^1.9.12" | ||
} | ||
} |
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,33 @@ | ||
# The `src/views` directory | ||
|
||
By default the contents of `src/views` gets copied into each of your project's `@http` `GET` functions (at `node_modules/@architect/views`) whenever you run: | ||
|
||
- `npx sandbox` | ||
- `npx deploy` | ||
|
||
This means the modules in this folder can be required from any `@http` `GET` function in your Architect project. | ||
|
||
For example, here's how you'd require `src/views/layout.js`: | ||
|
||
```javascript | ||
var layout = require('@architect/views/layout') | ||
``` | ||
|
||
Furthermore you can define specific lambdas to add `@architects/views` to by defining them in your app's `.arc` file by using the `@views` key. | ||
|
||
``` | ||
@views | ||
get / | ||
get /about | ||
get /js/:module | ||
``` | ||
|
||
## How is this different from `src/shared`? | ||
|
||
When we looked at how people were using `src/shared` we saw that people realized it was an easy way to share view components. Which is true, but we felt we could make it more explicit while also not bloating every function when the workflow desired was specifically for `@http` `GET`s. | ||
|
||
## Use caution! | ||
|
||
Everything in `src/views` will be copied into all of your project's `@http` `GET` Lambdas, which has the potential to bloat your application. | ||
|
||
Remember you want to keep your Lambda functions sub-5MB for optimal coldstart performance. |