Skip to content

Instantly share code, notes, and snippets.

@stevenarellano
stevenarellano / Calculator-Empty.sol
Last active September 26, 2022 21:30
basic solidity calculator
// SPDX-License-Identifier: MIT
pragma solidity 0.8.13;
contract Calculator {
int c;
// 1. create a constructor function that initializes our base calculator value
constructor() {}
// 2. create interface functions for adding, subtracting, multiplying, and dividing c by a number a
@stevenarellano
stevenarellano / db.js
Last active February 12, 2022 04:04
POSTGRES SQL SERVER
// postgress library connection creating a pool
const { Pool } = require("pg");
function createPool() {
const CONFIG = {
// user information
user: "USER",
// host information
host: "HOST",
// database information
@stevenarellano
stevenarellano / index.js
Last active February 12, 2022 03:23
NODE.JS SERVER
// Basic imports for running the server
const express = require("express");
const app = express();
// Run the Server
app.get("/", (req, res) => {
res.send("Server Connected!");
});
// Connect to the Server