최원석
Committed by GitHub

Merge pull request #7 from goesnow/goesnow

Goesnow
node_modules
**/node_modules/
.env
.vscode
.vscode/**
**/.idea/
crawler/chromedriver
crawler/chromedriver.exe
.idea
**/*.exe
package-lock.json
app/build/*.map
app/build/*.js
build
**/build/
public
key.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
# check your instagram!
# Check your instagram!
```
Lookup ID, and Compare!
## Execute server
```shell
python -m pipenv shell
python server.py
```
## Execute only frontend
[link](https://github.com/1Seok2/check-your-instagram/tree/master/app)
......
......@@ -15,4 +15,9 @@ npm run build
npm run start
```
`npm run start`만 진행할 시 수정사항이 적용되지 않음
\ No newline at end of file
`npm run start`만 진행할 시 수정사항이 적용되지 않음
### 최종 빌드 진행
```shell
npm run predeploy
```
\ 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']);
});
});
This diff could not be displayed because it is too large.
......@@ -19,13 +19,16 @@
"posttest": "npm.cmd run lint",
"compile": "tsc -w",
"build": "webpack --watch",
"start": "webpack serve --open"
"start": "webpack serve --open",
"predeploy" : "webpack"
},
"devDependencies": {
"@types/node": "^14.11.2",
"clean-webpack-plugin": "^3.0.0",
"css-loader": "^5.1.1",
"file-loader": "^6.2.0",
"gts": "^3.1.0",
"html-webpack-plugin": "^5.3.0",
"style-loader": "^2.0.0",
"ts-loader": "^8.0.17",
"typescript": "^4.0.3",
......
This diff is collapsed. Click to expand it.
......@@ -6,6 +6,5 @@
</head>
<body>
<div id="App"></div>
<script type="module" src="public/main.js" ></script>
</body>
</html>
\ No newline at end of file
......
const path = require('path')
const path = require('path');
const { CleanWebpackPlugin } = require('clean-webpack-plugin');
const HtmlWebpackPlugin = require('html-webpack-plugin')
module.exports = {
mode : 'development',
......@@ -30,17 +32,23 @@ module.exports = {
extensions: [".tsx", ".ts", ".js"],
},
output : {
publicPath: '/app',
publicPath: '/app/public',
path: path.resolve('./public'),
filename: '[name].js',
},
devServer : {
port : 3000,
hot: true,
contentBase: __dirname,
contentBase: __dirname + '/public/',
inline: true,
watchOptions: {
poll: true
}
}
},
plugins : [
new CleanWebpackPlugin(),
new HtmlWebpackPlugin({
template : './src/index.html'
})
]
}
\ No newline at end of file
......
No preview for this file type
import os
from flask import Flask, render_template, request, jsonify, send_from_directory
from crawler.crawler_instagram import crawler_instagram
app = Flask(__name__)
@app.errorhandler(404)
def page_not_found():
return render_template('404.html')
@app.route("/")
def home():
# return render_template('index.html')
return send_from_directory('./app','index.html')
@app.route("/update", methods=["GET"])
def update():
insta_id = request.args.get('insta_id')
def update(insta_id):
crawler_instagram(insta_id)
data = {
......@@ -27,9 +17,16 @@ def update():
}
return jsonify(data)
@app.route("/hello", methods=["GET"])
def hello():
return "hello"
@app.route("/", defaults={"path": ""})
@app.route("/<path:path>")
def home(path):
# return render_template('index.html')
if path == 'update':
insta_id = request.args.get('insta_id')
update(insta_id)
else :
return send_from_directory('./app/public/', 'index.html')
if __name__ == "__main__":
......