diff options
| author | Ruben Beltran del Rio <ruben@unlimited.pizza> | 2021-12-20 00:11:18 +0100 |
|---|---|---|
| committer | Ruben Beltran del Rio <ruben@unlimited.pizza> | 2021-12-20 00:11:18 +0100 |
| commit | 92ccd82c73463fa0b67996dc9212e992f90a1454 (patch) | |
| tree | 456f16a2a88c3f9613c9eaf3dcdf3876aa36d689 /scripts | |
| parent | 55fd5e33b1430fd6498f476490da6b5fa6abd70c (diff) | |
Diffstat (limited to 'scripts')
| -rw-r--r-- | scripts/mime.types | 11 | ||||
| -rw-r--r-- | scripts/setup_database.js | 46 | ||||
| -rw-r--r-- | scripts/upload.sh | 6 |
3 files changed, 17 insertions, 46 deletions
diff --git a/scripts/mime.types b/scripts/mime.types new file mode 100644 index 0000000..19eb627 --- /dev/null +++ b/scripts/mime.types @@ -0,0 +1,11 @@ +application/javascript js mjs cjs +application/json json +application/manifest+json webmanifest +application/zip zip +image/gif gif +image/jpeg jpg jpeg +image/png png +image/vnd.microsoft.icon ico +text/css css +text/html html htm +text/plain txt diff --git a/scripts/setup_database.js b/scripts/setup_database.js deleted file mode 100644 index 554f8d1..0000000 --- a/scripts/setup_database.js +++ /dev/null @@ -1,46 +0,0 @@ -'use strict'; - -const Config = require('../config/config'); -const Mysql = require('mysql2'); - -const internals = {}; - -internals.run = () => { - - console.log(' .'); - console.log(' /'); - console.log(' +-----+'); - console.log(' | o o | - Loading Good Things Momentarily'); - console.log(' +-----+'); - console.log(' +---------+'); - console.log(' /| [][] |\\'); - console.log(' || | |'); - console.log(' || | \\c'); - console.log(' ^+---------+'); - console.log(' (.) '); - - const connection = Mysql.createConnection(Config.mysql); - - console.log(`> *BEEP* CREATING TABLE: ${Config.mysql.tableName}!`); - connection.query(`CREATE TABLE ${Config.mysql.tableName} (` + - 'id SERIAL, ' + - 'l VARCHAR(255), ' + - 'g VARCHAR(255), ' + - 't VARCHAR(255), ' + - 'm VARCHAR(255), ' + - 'emoji VARCHAR(255), ' + - 'PRIMARY KEY (id) ' + - ') CHARACTER SET utf8mb4', (err) => { - - if (err) { - console.error(`> *BWOOOP* ERROR DETECTED: ${err.message}!`); - process.exit(1); - } - - console.log('> *BEEP BEEP* SUCCESS!'); - process.exit(0); - }); -}; - -internals.run(); - diff --git a/scripts/upload.sh b/scripts/upload.sh new file mode 100644 index 0000000..36a2b49 --- /dev/null +++ b/scripts/upload.sh @@ -0,0 +1,6 @@ +#!/usr/bin/env sh + +: "${S3_BUCKET:=lgtm.limited.pizza}" + +echo "Uploading to $S3_BUCKET" +aws s3 sync --acl public-read --delete build s3://$S3_BUCKET |