최원석3 [goesnow]

add frontend server

......@@ -5,6 +5,7 @@ chromedriver
app/**/*.map
app/**/*.js
build
key.py
admin.py
......
......@@ -11,7 +11,7 @@
<excludeFolder url="file://$MODULE_DIR$/venv" />
<excludeFolder url="file://$MODULE_DIR$/venv3" />
</content>
<orderEntry type="jdk" jdkName="Python 3.8 (venv3)" jdkType="Python SDK" />
<orderEntry type="jdk" jdkName="Python 3.7 (check-your-instagram)" jdkType="Python SDK" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>
\ No newline at end of file
......
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectRootManager" version="2" project-jdk-name="Python 3.8 (venv3)" project-jdk-type="Python SDK" />
<component name="ProjectRootManager" version="2" project-jdk-name="Python 3.7 (check-your-instagram)" project-jdk-type="Python SDK" />
</project>
\ No newline at end of file
......
......@@ -7,7 +7,16 @@ typescript만으로 작성
npx gts init
```
# 개발
### 프로젝트 dev 모드
```shell
tsc -w
```
### 프론트 서버 띄우기
```shell
npm install -g http-server
cd ./app
http-server ./
```
\ No newline at end of file
......
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<body>
<div id="App"></div>
<script>var exports = {};</script>
<script src="build/src/index.js" ></script>
</body>
</html>
\ No newline at end of file
......@@ -17,7 +17,9 @@
"fix": "gts fix",
"prepare": "npm.cmd run compile",
"pretest": "npm.cmd run compile",
"posttest": "npm.cmd run lint"
"posttest": "npm.cmd run lint",
"build": "tsc --build",
"dev": "tsc -w"
},
"devDependencies": {
"@types/node": "^14.11.2",
......
console.log('Try npm run lint/fix!');
const hi = 'hi';
const longString =
'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer ut aliquet diam.';
export const hi1 = () => {
console.log(hi);
};
const trailing = 'Semicolon';
const why = 'am I tabbed?';
export function doSomeStuff(
withThis: string,
andThat: string,
andThose: string[]
) {
//function on one line
if (!andThose.length) {
return false;
}
console.log(withThis);
console.log(andThat);
console.dir(andThose);
return;
}
// TODO: more examples
hi1();
\ No newline at end of file
......
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
import os
from flask import Flask, render_template, request, jsonify
from flask import Flask, render_template, request, jsonify, send_from_directory
from crawler.crawler_instagram import crawler_instagram
......@@ -13,7 +13,8 @@ def page_not_found():
@app.route("/")
def home():
return render_template('index.html')
# return render_template('index.html')
return send_from_directory('./app','index.html')
@app.route("/update", methods=["GET"])
......