Skip to content

Instantly share code, notes, and snippets.

@thiagocom
thiagocom / app.js
Last active November 22, 2019 18:52
Basic server with express
const express = require("express")
const logger = require("morgan")
require("dotenv").config()
const routes = require("./routes")
const app = express()
app.set("port", process.env.PORT || 8080)
app.use(express.json())
app.use(express.urlencoded({ extended: false }))
# -*- coding: utf-8 -*-
# FLASK
from functools import wraps
from flask import Flask, redirect, url_for, request, session, g, render_template_string, flash
from werkzeug.security import generate_password_hash, check_password_hash
from sqlalchemy import create_engine, MetaData, Table, Column, Integer, String
engine = create_engine("sqlite:///app.db", echo=False)