
heroku
2021. 9. 22. 11:29
git & 배포/Deploy(AWS 등)
heroku 배포 CLI 개발때 서버실행하는 것은 주석처리 #! 개발때만 필요 # if __name__ == '__main__': # app.run_server(debug=True) 추가 부분 pip freeze > requirements.txt 필요한거 빼고 다 지우기 정리 후 Procfile 어플리케이션 타입을 알려주는 것 Procfile 생성 touch Procfile 이것은 웹사이트 용이다 gunicorn 파이썬을 위한 서버 pip install gunicorn git add . git commit -m'Profile' git push origin main (생략가능) git push heroku main (반드시) 수정하기 바꾼 후 위에 과정을 다시 반복
CSS 초기화 reset 리셋
2021. 9. 20. 21:52
Frontend/HTML, CSS, DOM, jQuery
/*! normalize.css v3.0.2 | MIT License | git.io/normalize */ /** * 1. Set default font family to sans-serif. * 2. Prevent iOS text size adjust after orientation change, without disabling * user zoom. */ html { font-family: sans-serif; /* 1 */ -ms-text-size-adjust: 100%; /* 2 */ -webkit-text-size-adjust: 100%; /* 2 */ } /** * Remove default margin. */ body { margin: 0; } /* HTML5 display definiti..
requests 모듈로 스크랩(크롤링 할때) 웹페이지 접속은 되는데, 503 error(에러) 뜰때
2021. 9. 20. 17:10
Web/crawling
웹페이지 접속은 되는데, 503 에러가 계속 뜰때 ex). remoteok.io 그 페이지에서 스크랩 방지를 걸어놓은 것이다 해결방법 headers = {'User-Agent': 'Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2228.0 Safari/537.36',} r = requests.post(url, headers=headers) r.raise_for_status() def export_remote_jobs(): word = 'python' SEARCH_URL = f"https://remoteok.io/remote-dev+{word}-jobs?hide_sticky=&compact_mode=true&l..

쿠키(cookie) 사용법 (불러오기 ,저장 등)
2021. 9. 17. 12:14
Backend 언어 및 프레임워크/Javascript- Node, express, Nest
쿠키값 보기 cookie-parser npm install cookie-parser 추가 사항 var cookieParser = require('cookie-parser') app.use(cookieParser()) 확인 const cookie = req.cookies console.log(cookie) 쿠키값 저장 res.cookie('test','test-cookie") 활용 예시 app.get('/session', async function (req, res) { gong_id = req.session.userinfo.gong_id res.cookie('gong_id',gong_id) var sess = req.session; res.json(sess); }); app.get('/cookie', a..