- [OPTIONAL] Modify
src/main.ts
to enable CORS:
async function bootstrap() {
const app = await NestFactory.create(AppModule);
app.enableCors();
await app.listen(process.env.PORT || 3000);
}
/* | |
* This is a quick and dirty script for copying files in AWS S3 to other buckets. | |
* This is written so it can work across AWS accounts. | |
* You can hack in code to apply work or logic to each file. | |
* | |
* For each file, it downloads locally to a tmp file and then starts uploading as soon as possible | |
* and deletes the file immediately when the upload is done. | |
* | |
* Best way to use: Spin up a micro in EC2, install node.js, | |
* create a directory and install the dependencies with |
References: | |
http://blog.carbonfive.com/2012/02/27/supporting-cross-domain-ajax-in-rails-using-jsonp-and-cors/ | |
https://github.com/cyu/rack-cors | |
http://nelm.io/blog/2011/11/cors-with-sencha-touch/ | |
http://jessehowarth.com/2011/04/27/ajax-login-with-devise | |
============================================================================================================= | |
GEMFILE | |
============================================================================================================= | |
gem 'rack-cors', :require => 'rack/cors' |
=Navigating= | |
visit('/projects') | |
visit(post_comments_path(post)) | |
=Clicking links and buttons= | |
click_link('id-of-link') | |
click_link('Link Text') | |
click_button('Save') | |
click('Link Text') # Click either a link or a button | |
click('Button Value') |