SNS

SNS API 서버 nodebird-api로 돌아와 API 라우터를 완성해보자. const express = require('express'); const jwt = require('jsonwebtoken'); const { verifyToken } = require('./middlewares'); const { Domain, User, Post, Hashtag } = require('../models'); const router = express.Router(); router.post('/token', async (req, res) => { const { clientSecret } = req.body; try { const domain = await Domain.findOne({ where: { cli..
프로젝트 생성 140자의 단문 메시지를 보내고 공유하는 서비스를 따라 해 보자. nodebird라는 프로젝트를 만들자. { "name": "nodebird", "version": "1.0.0", "description": "sns service using express", "main": "index.js", "scripts": { "start": "nodemon app", "test": "echo \"Error: no test specified\" && exit 1" }, "author": "hvvan", "license": "MIT" } npm i sequelize mysql2 sequelize-cli npx sequelize init 그리고 views, route, public, passport 폴더..
그래프 그리기 ax = plt.subplots() ax = tips['total_bill'].plot.hist() 우선 시리즈에 있는 plot 속성에 정의된 hist 메서드를 사용하여 히스토그램을 그릴 수 있다. 투명도를 조절하려면 hist 메서드의 alpha, bins, ax 인자를 사용하면 된다. fig, ax = plt.subplots() ax = tips[['total_bill', 'tip']].plot.hist(alpha=0.5, bins=20, ax=ax) 밀집도, 산점도 그래프, 육각 그래프는 각각 kde, scatter, hexbin 메서드를 사용하면 된다. fig, ax = plt.subplots() ax = tips['tip'].plot.kde() fig, ax = plt.subplot..