최원석
Committed by GitHub

Merge pull request #6 from goesnow/goesnow

Goesnow
node_modules
.env
.vscode
chromedriver
crawler/chromedriver
crawler/chromedriver.exe
.idea
**/*.exe
package-lock.json
app/build/*.map
app/build/*.js
build
public
key.py
admin.py
......
# Default ignored files
/shelf/
/workspace.xml
# Datasource local storage ignored files
/dataSources/
/dataSources.local.xml
# Editor-based HTTP Client requests
/httpRequests/
......@@ -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="PublishConfigData" remoteFilesAllowedToDisappearOnAutoupload="false">
<serverData>
<paths name="ubuntu@52.197.199.6:22">
<serverdata>
<mappings>
<mapping local="$PROJECT_DIR$" web="/" />
</mappings>
</serverdata>
</paths>
<paths name="ubuntu@54.199.111.206:22">
<serverdata>
<mappings>
<mapping local="$PROJECT_DIR$" web="/" />
</mappings>
</serverdata>
</paths>
<paths name="ubuntu@54.248.71.175:22">
<serverdata>
<mappings>
<mapping local="$PROJECT_DIR$" web="/" />
</mappings>
</serverdata>
</paths>
</serverData>
</component>
</project>
\ No newline at end of file
<component name="InspectionProjectProfileManager">
<profile version="1.0">
<option name="myName" value="Project Default" />
<inspection_tool class="Eslint" enabled="true" level="WARNING" enabled_by_default="true" />
<inspection_tool class="TsLint" enabled="true" level="WARNING" enabled_by_default="true" />
</profile>
</component>
\ 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
......
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/check-your-instagram.iml" filepath="$PROJECT_DIR$/.idea/check-your-instagram.iml" />
</modules>
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="" vcs="Git" />
</component>
</project>
\ No newline at end of file
build/
gulpfile.js
gulp.js
webpack.config.js
{
"extends": "./node_modules/gts/"
}
module.exports = {
...require('gts/.prettierrc.json')
}
# Front end
typescript만으로 작성
### 프로젝트 생성
```shell
npx gts init
```
# 개발
### 프론트 서버 띄우기
```shell
npm run build
npm run start
```
`npm run start`만 진행할 시 수정사항이 적용되지 않음
\ No newline at end of file
......
export declare const Bye: () => void;
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.Bye = void 0;
const Bye = () => console.log('Bye!');
exports.Bye = Bye;
//# sourceMappingURL=Bye.js.map
\ No newline at end of file
{"version":3,"file":"Bye.js","sourceRoot":"","sources":["../../src/Bye.ts"],"names":[],"mappings":";;;AAAO,MAAM,GAAG,GAAG,GAAG,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;AAAhC,QAAA,GAAG,OAA6B"}
\ No newline at end of file
import './assets/style/App.css';
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const Bye_1 = require("./Bye");
require("./assets/style/App.css");
const hi = 'hello!?zz';
const hi1 = () => {
console.log(hi);
Bye_1.Bye();
};
hi1();
//# sourceMappingURL=index.js.map
\ No newline at end of file
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;AAAA,+BAA0B;AAC1B,kCAAgC;AAEhC,MAAM,EAAE,GAAG,WAAW,CAAC;AAEvB,MAAM,GAAG,GAAG,GAAG,EAAE;IACf,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;IAChB,SAAG,EAAE,CAAC;AACR,CAAC,CAAC;AAEF,GAAG,EAAE,CAAC"}
\ No newline at end of file
export declare const Bye: () => void;
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.Bye = void 0;
const Bye = () => console.log('Bye!');
exports.Bye = Bye;
//# sourceMappingURL=Bye.js.map
\ No newline at end of file
{"version":3,"file":"Bye.js","sourceRoot":"","sources":["../../../src/ts/Bye.ts"],"names":[],"mappings":";;;AAAO,MAAM,GAAG,GAAG,GAAG,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;AAAhC,QAAA,GAAG,OAA6B"}
\ No newline at end of file
const gulp = require('gulp');
const browserify = require('browserify');
const watchify = require('watchify');
const errorify = require('errorify');
const del = require('del');
const tsify = require('tsify');
const source = require('vinyl-source-stream');
const buffer = require('vinyl-buffer');
const runSequence = require('run-sequence');
const uglify = require('gulp-uglify');
gulp.task('clean', () => {
return del('./built/**/*')
});
gulp.task('prod', () => {
browserify({
basedir: '.',
debug: true,
entries: ['src'],
cache: {},
packageCache: {}
})
.plugin(tsify)
.bundle()
.pipe(source('bundle.js'))
.pipe(buffer())
.pipe(uglify())
.pipe(gulp.dest('built'));
});
gulp.task('dev', () => {
browserify({
basedir: '.',
debug: true,
entries: ['src'],
cache: {},
packageCache: {}
})
.plugin(tsify)
.plugin(watchify)
.plugin(errorify)
.bundle()
.pipe(source('bundle.js'))
.pipe(gulp.dest('built'));
});
gulp.task('default', (done) => {
runSequence('clean', 'dev', () => {
console.log('Watching...')
gulp.watch(['src/**/*.ts'],
['dev']);
});
});
gulp.task('package', (done) => {
runSequence('clean', 'prod', () => {
console.log('Watching...')
gulp.watch(['src/**/*.ts'],
['prod']);
});
});
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>home</title>
</head>
<body>
<div id="App"></div>
<script type="module" src="public/main.js" ></script>
</body>
</html>
\ No newline at end of file
This diff could not be displayed because it is too large.
{
"name": "",
"version": "0.0.0",
"description": "",
"main": "build/src/index.js",
"types": "build/src/index.d.ts",
"files": [
"build/src"
],
"license": "Apache-2.0",
"keywords": [],
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"lint": "gts lint",
"clean": "gts clean",
"fix": "gts fix",
"prepare": "npm.cmd run compile",
"pretest": "npm.cmd run compile",
"posttest": "npm.cmd run lint",
"compile": "tsc -w",
"build": "webpack --watch",
"start": "webpack serve --open"
},
"devDependencies": {
"@types/node": "^14.11.2",
"css-loader": "^5.1.1",
"file-loader": "^6.2.0",
"gts": "^3.1.0",
"style-loader": "^2.0.0",
"ts-loader": "^8.0.17",
"typescript": "^4.0.3",
"webpack": "^5.24.3",
"webpack-cli": "^4.5.0",
"webpack-dev-server": "^3.11.2"
}
}
This diff is collapsed. Click to expand it.
export const Bye = () => console.log('Bye!');
body{
background-color: beige;
}
\ No newline at end of file
declare module '*.png';
import {Bye} from './Bye';
import './assets/style/App.css';
import v4 from './assets/image/v4Logo.png';
const hi = 'hchoi won';
const hi1 = () => {
console.log(hi);
Bye();
const tag = window.document.querySelector('#App');
if(tag) {
tag.innerHTML = `<img src=${v4} alt="image" />`;
}
};
hi1();
\ No newline at end of file
{
"extends": "./node_modules/gts/tsconfig-google.json",
"compilerOptions": {
"lib": ["es5", "es6", "dom"],
"rootDir": ".",
"outDir": "build",
"target": "es6",
"module": "commonjs",
"strict": true,
"removeComments": true,
"esModuleInterop": true
},
"include": [
"src/**/*.ts"
],
}
const path = require('path')
module.exports = {
mode : 'development',
entry : {
// main : './build/src/index.js'
main : './src/index.ts'
},
module : {
rules : [
{
test: /\.tsx?$/,
use: "ts-loader",
exclude: /node_modules/,
},
{
test : /\.css$/,
use: ['style-loader', 'css-loader'],
},
{
test: /\.(png|jpe?g|gif|jp2|webp)$/,
loader: 'file-loader',
options: {
name: 'images/[name].[ext]'
},
}
]
},
resolve : {
extensions: [".tsx", ".ts", ".js"],
},
output : {
publicPath: '/app',
path: path.resolve('./public'),
filename: '[name].js',
},
devServer : {
port : 3000,
hot: true,
contentBase: __dirname,
inline: true,
watchOptions: {
poll: true
}
}
}
\ 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
......@@ -20,4 +20,3 @@ requests-toolbelt==0.7.0
rsa==4.7.2
six==1.15.0
Werkzeug==1.0.1
......
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"])
......