Skip to content

Instantly share code, notes, and snippets.

@jinwook-k
jinwook-k / weather.js
Last active July 28, 2020 05:57
server/api/weather.js
const axios = require("axios");
// Configuring the path to read the environment variable file, .env, to get the weather api key
require('dotenv').config({path: "./../../../.env"});
const baseUrl = "http://api.openweathermap.org/data/2.5/weather";
class Weather {
/**
@jinwook-k
jinwook-k / server.js
Last active September 21, 2020 03:14
server/server.js
require('dotenv').config();
const express = require('express');
const bodyParser = require('body-parser');
const app = express();
const port = process.env.PORT || 5000;
// use body parser to get data from POST requests
app.use(bodyParser.json());
app.use(bodyParser.urlencoded({ extended: true }));
[
{
"name": "account_id",
“type”: “STRING”,
“mode”: “NULLABLE”
},
{
“name”: “account_name”,
“type”: “INT64”,
“mode”: “NULLABLE”
@jinwook-k
jinwook-k / create_table account_d.sql
Created April 3, 2019 14:29
create table account_d
(
account_id bigint encode bytedict,
account_name varchar(100) encode ztsd,
account_update_date date,
primary key (account_id)
)
distsyle all
sortkey(account_id)
;
rustup update
rustup target add wasm32-unknown-unknown --toolchain nightly
rustc +nightly --target wasm32-unknown-unknown -O --crate-type=cdylib add.rs -o add.big.wasm

wasm-gc add.big.wasm add.wasm