Giter Site home page Giter Site logo

sg_blog's Introduction

Blog

12/25 1차 완료했고, 조회수기능 부분은 아직 좀 더 진행 예정입니다

📒 개요

스마일게이트 데브 캠프 1인 프로젝트 blog 입니다.

📗 기간

2022.12.05. ~ 2022.12.25.

📙 Feature

✔ 글 쓰기/ 수정

✔ 글 목록/삭제

✔ 댓글

✔관리자 도구

✔ UI디자인

📔 화면

홈화면

관리자도구

글 작성화면

글 보여주는 화면

📘 Tech stack

front

  • React  v.18

back

  • node.js   v16.18.1
  • MySQL   v5.7

개발도구

  • VScode

📖 시스템 구조 (개발 전 설계할 때 이렇게 설계한 후 개발하였습니다)

서버 포트 번호

  • 리액트 : 8080
  • nginx(프록시 서버) :80
  • 글, 댓글 서버 : 3000
  • 이미지 서버 : 4000

⭐ 프로젝트 중 확인받고 싶었던 부분

페이징처리부분!

const connection = require("../dbConfig");
const router = require("express").Router();

const postPerPage = 6;
router.get("/:page", async (req, res) => {
  const received = req.params;
  const page = parseInt(received.page);
  const startNumber = (page - 1) * postPerPage;
  const sql = `select * from post limit ${startNumber}, 6`;
  connection.query(sql, (error, rows) => {
    if (error) throw error;
    res.send(rows);
  });
});

module.exports = router;

⭐ 개발 과정에서 궁금했던 부분

   1.  현재 컴포넌트마다 각각 api 호출해서 하고 있는데 api 호출하는 부분을 recoil이나 redux로 전역상태로 따로 빼서 관리하는 것이 좋은지 궁금합니다!!!
      
   2. axios.get 으로 받아온 json array를 Obect.keys().map()으로 처리했는데 json array에서 배열만 빼서 map메소드로만 처리하는 방법이 궁금합니다.
  
   3.  issue#9 (링크: https://github.com/PARKGAIN/sg_blog/issues/9) 여기에서 삭제 후 getPost()를 호출해도 바로 렌더링이 안되는 이유가 궁금합니다

sg_blog's People

Contributors

parkgain avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.