This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// postgress library connection creating a pool | |
const { Pool } = require("pg"); | |
function createPool() { | |
const CONFIG = { | |
// user information | |
user: "USER", | |
// host information | |
host: "HOST", | |
// database information |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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 |