최원석3 [goesnow]

resolve conflicts

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
......
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="FacetManager">
<facet type="Python" name="Python">
<configuration sdkName="" />
</facet>
</component>
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
<excludeFolder url="file://$MODULE_DIR$/venv" />
<excludeFolder url="file://$MODULE_DIR$/venv3" />
</content>
<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.7 (check-your-instagram)" project-jdk-type="Python SDK" />
</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;
......
import './assets/style/App.css';
......
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
{
"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
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"])
......