As easy as 1, 2, 3!
Updated:
- Aug, 08, 2022 update
configdocs for npm 8+ - Jul 27, 2021 add private scopes
- Jul 22, 2021 add dist tags
- Jun 20, 2021 update for
--access=public - Sep 07, 2020 update docs for
npm version
| # Everything else that does not exists on disk redirect to Angular | |
| location ~ ^/(?<selectedLanguage>ar|br|cs|de|en|es|fr|is|it|ku|lb|pl|pt|zh) { | |
| # If bot, give a SSR prerendered page | |
| error_page 419 = @ssr; | |
| if ($http_user_agent ~* "yahoo|bingbot|baiduspider|yandex|yeti|yodaobot|gigabot|facebookexternalhit|twitterbot") { | |
| return 419; | |
| } | |
| try_files $uri /$selectedLanguage/index.html?$args; | |
| } |
| user nginx; | |
| # one(1) worker or equal the number of _real_ cpu cores. 4=4 core cpu | |
| worker_processes 4; | |
| # renice workers to reduce priority compared to system processes for | |
| # machine health. worst case nginx will get ~25% system resources at nice=15 | |
| worker_priority -5; |
| // Create S3 bucket | |
| var s3client = dynAws.getKnoxClient("bucketname"); | |
| var httpReq = s3client.put("/", {}); | |
| httpReq.on('response', function (response) { | |
| // 200 indicates successful bucket creation | |
| console.log(response.statusCode); | |
| }).end(); |