Toggle navigation
Toggle navigation
This project
Loading...
Sign in
최원석
/
2021-1-database-project
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
최원석3 [goesnow]
2021-03-08 17:52:54 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
f17285228a3d4d49b9a6ffa49e47bf1e2909ff34
f1728522
1 parent
c1e20916
edit routing
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
28 additions
and
80 deletions
README.MD
app/README.MD
app/gulpfile.js
app/package.json
server.py
README.MD
View file @
f172852
#
c
heck your instagram!
#
C
heck 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
)
...
...
app/README.MD
View file @
f172852
...
...
@@ -16,3 +16,8 @@ npm run start
```
`npm run start`
만 진행할 시 수정사항이 적용되지 않음
### 최종 빌드 진행
```
shell
npm run predeploy
```
\ No newline at end of file
...
...
app/gulpfile.js
deleted
100644 → 0
View file @
c1e2091
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'
]);
});
});
app/package.json
View file @
f172852
...
...
@@ -19,7 +19,8 @@
"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"
,
...
...
server.py
View file @
f172852
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__"
:
...
...
Please
register
or
login
to post a comment