16bugs JavaScript: from Zero to Hero
Log in

JavaScript: from Zero to Hero

#95 Think about the best way to share the source code with the EAP members

Reported by Volkan Ozcelik · 13 Jul 2018, 22:14

Status
New
Priority
Normal
Assigned to
Volkan Ozcelik
Category
Website
Version
None

Think about the best way to share the source code with the EAP members

also p^.

Comments

Volkan Ozcelik · 13 Jul 2018, 22:31

I think the simplest way is to put it to an S3 bucket and generate a time-limited download url

That can be a part of a lesson, too.

```
const AWS = require('aws-sdk')

const s3 = new AWS.S3()
AWS.config.update({accessKeyId: 'id-omitted', secretAccessKey: 'key-omitted'}

const myBucket = 'bucket-name'
const myKey = 'sourceCode.zip'
const signedUrlExpireSeconds = 60 * 5

const url = s3.getSignedUrl('getObject', {
Bucket: myBucket,
Key: myKey,
Expires: signedUrlExpireSeconds
})

console.log(url)
```

Volkan Ozcelik · 13 Jul 2018, 22:36

Also I need a script to automate this.

`npm run publish:s3` will...

1. copy the required files to a tmp folder (removing node_modules and .env files etc)
2. zip that tmp folder.
3. publish it to s3

This should better be a part of the CI pipeline too. I don't need to run it manually on my machine.

Volkan Ozcelik · 22 Jul 2018, 18:00

For now, I'm pasting the zip to the slack channel: A la startup style.

I'll find a better way when I have time.

Moving this out of the first version for now, to be tackled later.

History

13 Jul 2018, 22:14Volkan Ozcelik submitted the bug
13 Jul 2018, 22:31Volkan Ozcelik commented on the bug
13 Jul 2018, 22:36Volkan Ozcelik commented on the bug
13 Jul 2018, 22:38Volkan Ozcelik updated the bug
Status: New → New
Priority: Normal → Normal
Assignee: Volkan Ozcelik → Volkan Ozcelik
Category: Website → Website
Version: none → 0.5.0.introduction
22 Jul 2018, 18:00Volkan Ozcelik commented on the bug
22 Jul 2018, 18:00Volkan Ozcelik updated the bug
Status: New → New
Priority: Normal → Normal
Assignee: Volkan Ozcelik → Volkan Ozcelik
Category: Website → Website
Version: 0.5.0.introduction → none