Routes are prefixed with /api
Endpoint: GET /auth/:telegramId
| // SPDX-License-Identifier: MIT | |
| pragma solidity ^0.8.20; // declare the version of solidity to compile this contract. This must match the version of solidity in your hardhat.config.js file | |
| // add ownable and ERC721.sol | |
| import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; | |
| import "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol"; | |
| import "@openzeppelin/contracts/access/Ownable.sol"; | |
| import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; | |
| import "@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Supply.sol"; | |
| import "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol"; |
| /** | |
| * Retrieves all the rows in the active spreadsheet that contain data and logs the | |
| * values for each row. | |
| * For more information on using the Spreadsheet API, see | |
| * https://developers.google.com/apps-script/service_spreadsheet | |
| */ | |
| function readRows() { | |
| var sheet = SpreadsheetApp.getActiveSheet(); | |
| var rows = sheet.getDataRange(); | |
| var numRows = rows.getNumRows(); |
| UserData: | |
| "Fn::Base64": !Sub | | |
| #!/bin/bash | |
| yum install ruby -y | |
| wget https://aws-codedeploy-${AWS::Region}.s3.${AWS::Region}.amazonaws.com/latest/install | |
| chmod +x ./install | |
| ./install auto | |
| cd /tmp | |
| yum install -y https://s3.amazonaws.com/ec2-downloads-windows/SSMAgent/latest/linux_amd64/amazon-ssm-agent.rpm | |
| systemctl enable amazon-ssm-agent |
| // SPDX-License-Identifier: MIT | |
| pragma solidity ^0.6.0; | |
| interface AggregatorV3Interface { | |
| function decimals() | |
| external | |
| view | |
| returns ( | |
| uint8 |
| require('dotenv').config(); | |
| const { ApolloServer } = require('apollo-server'); | |
| const Sentry = require('@sentry/node'); | |
| const { makeExecutableSchema } = require('@graphql-tools/schema'); | |
| const typeDefs = require('./src/graphql/typedefs'); | |
| const resolvers = require('./src/graphql/resolvers'); | |
| const schema = makeExecutableSchema({ | |
| typeDefs, | |
| resolvers, |
| const express = require('express'); | |
| const axios = require('axios').default; | |
| const { client, getAsync } = require('./redis'); | |
| const app = express(); | |
| app.get('/countries', async (request, response) => { | |
| try { | |
| const redisKey = 'COUNTRIES'; | |
| const countries = await getAsync(redisKey); |
| import http from "http"; | |
| import debug from "debug"; | |
| import { config } from "dotenv"; | |
| import app from "./app"; | |
| config(); | |
| const DEBUG = debug("dev"); | |
| const PORT = process.env.PORT || 5000; |
| // Go tour equivalent binary tree solution | |
| package main | |
| import ( | |
| "fmt" | |
| "golang.org/x/tour/tree" | |
| ) | |
| // Walk walks the tree t sending all values |
| // Line 138 (Update book) | |
| package main | |
| import ( | |
| "encoding/json" | |
| "fmt" | |
| "io/ioutil" | |
| "log" | |
| "net/http" |