1seok2

feat: add with database

No preview for this file type
No preview for this file type
build/
gulpfile.js
gulp.js
webpack.config.js
{
"extends": "./node_modules/gts/"
}
export const formatNumber = (number : number) : string => {
if(`${number}`.length > 6) {
return `${Math.floor(number / 1000000)}m`
}
else if(`${number}`.length > 3) {
return `${Math.floor(number / 1000)}k`
} else {
return `${number}`;
}
}
\ No newline at end of file
INSTAGRAM_URL="https://instagram.com"
INSTAGRAM_URL = "https://instagram.com"
DATABASE_URL = "localhost:1521"
......
File mode changed
import cx_Oracle
import os
from config.key import DATABASE_ID, DATABASE_PW
from config.URLs import DATABASE_URL
os.putenv('NLS_LANG', '.UTF8')
def connectDB():
connection = cx_Oracle.connect(DATABASE_ID, DATABASE_PW, DATABASE_URL)
cursor = connection.cursor()
# cursor.execute("""
# select name
# from test_db
# where text = :texting""",
# texting="테스트"
# )
return cursor
def closeDB(cursor):
cursor.close()
\ No newline at end of file