ABOUT ME

-

Today
-
Yesterday
-
Total
-
  • [WIL]항해99 3주차 주특기 기본 회고록
    항해99[WIL] 2021. 11. 21. 23:43

    항해 99 부트캠프 

     

    3주차 주특기 기본 주차 (11 . 15 월 ~ 11 . 20 토 총 6일간)

     

     

     

     

    목차

     

    - 주특기 기본 주차 개인 프로젝트

     

    - Restful API

     

    - package.json

     

    - 3주차 소감

     

     

     

     

    1.  주특기 기본  주차 개인 프로젝트

     

    3주차에 접어들면서 본인이 선택한 주특기에 대해서 개인 프로젝트를 진행했다. 나는 Node.js를 선택을 했고, 개인 프로젝트를 만들어서 제출을 할 때 꼭 진행해야할 조건들이 있었다.

    1. 전체 게시글 목록 조회 페이지
      • 제목, 작성자명, 작성 날짜를 조회하기
      • 작성 날짜 기준으로 내림차순 정렬하기
      • 특정 게시글을 클릭할 경우 게시글 조회 페이지로 이동하기
    2. 게시글 작성 페이지
      • 제목, 작성자명, 비밀번호, 작성 내용을 입력하기
      • "글쓰기" 버튼을 클릭하면 전체 게시글 목록 조회 페이지로 이동하고, 최신 게시글이 최상단에 위치함을 확인하기
    3. 게시글 조회 페이지
      • 제목, 작성자명, 작성 날짜, 작성 내용을 조회하기 (검색 기능이 아닙니다. 간단한 게시글 조회만 구현해주세요.)
    4. 게시글 수정 페이지
      • 작성 페이지와 동일한 폼. 수정하기 버튼을 클릭하면 작성되었던 게시글이 미리 입력되게 하기
      • 비밀번호란은 비워두기
      • "글쓰기" 버튼은 없고 "수정 완료", "삭제하기" 버튼만 만들기
      • "수정완료" 버튼을 누를 때 입력된 비밀번호를 비교하여 동일할 때만 글이 수정되게 하기
      • "삭제하기" 버튼을 누를 때 입력된 비밀번호를 비교하여 동일할 때만 글이 삭제되게 하기

    위에 나와 있는 조건들을 구현해서 제출 마감 날짜를 잘 지켜서 제출을 하기만 하면 되는 거였다.

     

    index.js 서버 코드

    const express = require('express')
    const Posts = require('./schemas/posts')
    const app = express()
    const port = process.env.PORT || 3000
    
    const connect = require("./schemas/index");
    connect();
    
    app.use(express.urlencoded({extended: false}))
    app.use(express.json())
    
    const postsRouter = require("./routers/posts");
    app.use("/api", postsRouter);
    
    app.set('views', __dirname + '/views');
    app.set('view engine', 'ejs');
    
    app.get('/home', async (req, res) => {
        const posts = await Posts.find()
        res.render('home', {posts: posts})
    })
    
    app.get('/write', (req, res) => {
        res.render('write')
    })
    
    app.get('/comment/:name', (req, res) => {
        let name  = req.params;
        res.render('comment', { name: name })
    })
    
    app.get('/update/:name', (req, res) => {
        let name = req.params;
        res.render('update', { name: name })
    })
    
    app.listen(port, () => {
        console.log(`listening at http://localhost:${port}`)
      })

     

    ../schemas/index.js DB연결

    const mongoose = require("mongoose");
    
    const connect = () => {
      mongoose
        .connect("mongodb://test:test@localhost:27017/admin", {
          useNewUrlParser: true,
          useUnifiedTopology: true,
          ignoreUndefined: true,
        })
        .catch(err => console.log(err));
    };
    
    mongoose.connection.on("error", err => {
      console.error("몽고디비 연결 에러", err);
    });
    module.exports = connect;

     

    ../schemas/posts.js DB필드값?

    const mongoose = require("mongoose");
    
    const { Schema } = mongoose;
        const postsSchema = new Schema({
            name: {
                type: String,
                required: true,
                unique: true
            },
            title: {
                type: String,
                required: true
            },
            content: {
                type: String,
                required: true
            },
            password: {
       
                type: Number && String,
                required: true
            },
            date: {
                type: Date,
                default: Date.now
            },
            //   update: {
            //     type: Date
            // }
        });
    
    module.exports = mongoose.model("Posts", postsSchema);

     

    ../routers/posts.js 라우트

    const express = require("express");
    const Posts = require('../schemas/posts')
    const router = express.Router();
    
    router.get("/posts", async (req, res, next) => {
      try {
        const { date } = req.query;
        const posts = await Posts.find({ date }).sort("-date");
        res.json({ posts: posts });
      } catch (err) {
        console.error(err);
        next(err);
      }
    });
    
    router.get("/posts/:name", async (req, res) => { 
      const { name } = req.params;
      // console.log(name)
      const posts = await Posts.findOne({ name: name });
      // console.log(posts)
      res.json({ posts: posts });
    });
    
    router.post ("/posts", async (req, res) => {
         try {
            console.log(req.body)
            post = await Posts.create({ 
              title: req.body.title,
              content: req.body.content,
              name: req.body.name,
              password: req.body.password
             });
            res.send({ result: "success" })
         } catch(err) {
             console.log("----------------------------")
             console.log("에러다" + err)
            res.redirect("/")
         }
    })
    
    router.patch("/posts/:name", async (req, res) => {
      const { name } = req.params;
      const { password, title, content} = req.body;
    
      const posts = await Posts.findOne({ name: name, password: password});
      console.log(posts)
      if (posts) {
        await Posts.updateOne({ name }, { title: title, content: content}); //db의 필드값: req.body
        res.send({ result: "success" });
      } else {
        res.send({ result: "fail" });
      }
    })
    
    router.delete("/posts/:name", async (req, res) => {
      const { name } = req.params;
      const { password } = req.body;
    
      const posts = await Posts.findOne({ name: name, password: password });
      if (posts) {
        await Posts.deleteOne({ name })
        res.send({ result: "success" })
      } else {
        res.send({ result: "fail" })
      }
    })
    
    module.exports = router;

     

     

    ../views/home.ejs 전체 게시글 목록 조회 페이지

    <!doctype html>
    <html lang="en">
    
    <head>
        <!-- Required meta tags -->
        <meta charset="utf-8">
        <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
        <link rel="icon" href="/static/favicon.ico" type="image/x-icon">
        <link rel="shortcut icon" href="/static/favicon.ico" type="image/x-icon">
        <!-- Bootstrap CSS -->
        <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.5.3/dist/css/bootstrap.min.css"
            integrity="sha384-TX8t27EcRE3e/ihU7zmQxVncDAy5uIKz4rEkgIXeMed4M0jlfIDPvg6uqKI2xXr2" crossorigin="anonymous">
    
        <!-- Font Awesome CSS -->
        <link href="//maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet">
        <!-- Optional JavaScript -->
        <!-- jQuery first, then Popper.js, then Bootstrap JS -->
        <script src="https://code.jquery.com/jquery-3.5.1.js"
            integrity="sha256-QWo7LDvxbWT2tbbQ97B53yJnYU3WhH/C8ycbRAkjPDc=" crossorigin="anonymous"></script>
        <script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.1/dist/umd/popper.min.js"
            integrity="sha384-9/reFTGAW83EW2RDu2S0VKaIzap3H66lZH81PoYlFhbGU+6BZp6G7niu735Sk7lN"
            crossorigin="anonymous"></script>
        <script src="https://cdn.jsdelivr.net/npm/bootstrap@4.5.3/dist/js/bootstrap.min.js"
            integrity="sha384-w1Q4orYjBQndcko6MimVbzY0tgp4pWB4lZ7lr30WKz0vr/aWKhXdBNmNb5D92v7s"
            crossorigin="anonymous"></script>
        <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-cookie/1.4.1/jquery.cookie.js"></script>
        <script src="https://cdnjs.cloudflare.com/ajax/libs/socket.io/2.4.0/socket.io.js"></script>
        <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.24.0/moment.min.js"></script>
        <title>항해99 4기 3주차 개인 프로젝트</title>
    
        <style>
            .posts {
                cursor: pointer
            }
            
            .card {
                cursor: pointer;
            }
    
            html {
                overflow: auto;
            }
        </style>
        <script>
    
            $(document).ready(function () {
                get_posts()
                })
    
            function get_posts() {
                $("#postlist").empty()
                $.ajax({
                    type: "GET",
                    url: '/api/posts',
                    data: {},
                    success: function (response) {
                        let posts = response["posts"]
                        for (let i = 0; i <posts.length; i++) {
    
                            let date = moment(posts[i]['date']).format('YYYY-MM-DD HH:mm')
                            make_card(posts[i], date)
    
                        }
                    }
                })
            }
    
            function make_card(posts, date) {
                let htmlTemp = `<tr class ="posts" onclick = "window.location.href = '/comment/${posts["name"]}'">
                                    <td>${posts["name"]}</td>
                                    <td>${posts["title"]}</td>
                                    <td>${date}</td>
                                </tr>`
                $("#postlist").append(htmlTemp)
            }
        </script>
    </head>
      <body>
        <div>
            <table class="table">
              <thead>
                <tr>
                  <th scope="col">작성자명</th>
                  <th scope="col">제목</th>
                  <th scope="col">날짜</th>
                </tr>
              </thead>
              <tbody id="postlist">
                <tr>
                  <td>이름</td>
                  <td>제목</td>
                  <td id="date">날짜</td>
                </tr>
              </tbody>
            </table>
            <a class="nav-link" href="/write">
            <button type="button" class="btn btn-primary">글쓰기</button>
            </a>
        </div>
      </body>
    </html>

     

    ../views/write.ejs 게시글 작성 페이지

    <!DOCTYPE html>
    <html lang="en">
      <head>
        <!-- Required meta tags -->
        <meta charset="utf-8" />
        <meta
          name="viewport"
          content="width=device-width, initial-scale=1, shrink-to-fit=no"
        />
        <link rel="icon" href="/static/favicon.ico" type="image/x-icon" />
        <link rel="shortcut icon" href="/static/favicon.ico" type="image/x-icon" />
        <!-- Bootstrap CSS -->
        <link
          rel="stylesheet"
          href="https://cdn.jsdelivr.net/npm/bootstrap@4.5.3/dist/css/bootstrap.min.css"
          integrity="sha384-TX8t27EcRE3e/ihU7zmQxVncDAy5uIKz4rEkgIXeMed4M0jlfIDPvg6uqKI2xXr2"
          crossorigin="anonymous"
        />
    
        <!-- Font Awesome CSS -->
        <link
          href="//maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css"
          rel="stylesheet"
        />
        <!-- Optional JavaScript -->
        <!-- jQuery first, then Popper.js, then Bootstrap JS -->
        <script
          src="https://code.jquery.com/jquery-3.5.1.js"
          integrity="sha256-QWo7LDvxbWT2tbbQ97B53yJnYU3WhH/C8ycbRAkjPDc="
          crossorigin="anonymous"
        ></script>
        <script
          src="https://cdn.jsdelivr.net/npm/popper.js@1.16.1/dist/umd/popper.min.js"
          integrity="sha384-9/reFTGAW83EW2RDu2S0VKaIzap3H66lZH81PoYlFhbGU+6BZp6G7niu735Sk7lN"
          crossorigin="anonymous"
        ></script>
        <script
          src="https://cdn.jsdelivr.net/npm/bootstrap@4.5.3/dist/js/bootstrap.min.js"
          integrity="sha384-w1Q4orYjBQndcko6MimVbzY0tgp4pWB4lZ7lr30WKz0vr/aWKhXdBNmNb5D92v7s"
          crossorigin="anonymous"
        ></script>
        <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-cookie/1.4.1/jquery.cookie.js"></script>
        <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.24.0/moment.min.js"></script>
    
        <title>항해99 4기 3주차 개인 프로젝트</title>
    
        <style>
            .wrBox{
                margin: 10px auto;
                width: 1000px;
                margin: 150px auto;
            }
        </style>
    
    <script>
      function posting() {
        let date = new Date()
        let borderDate = date.getTime()
        $.ajax({
          type: "POST",
          url: `/api/posts`,
          data: {
            title: $("#title").val(),
            name: $("#name").val(),
            password: $("#password").val(),
            content: $("#content").val(),
            date
          },
          success: function (response) {
            console.log(response)
            if (response['result'] == "success") {
              alert('작성완료')
              window.location.href="/home"
            }
          }
        });
      }
    </script>
      </head>
    
      <body>
          <div class="wrBox">
            <div class="form-group">
              <label for="title">제목</label>  
              <input type="text" class="form-control" id="title" placeholder="제목을 적어주세요.">
              </div>
              <div class="form-group">
                <label for="content">내용</label>
                <textarea class="form-control" id="content" rows="10" placeholder="내용을 적어주세요."></textarea>
              </div>
              <div class="form-group mx-sm-3 mb-2">
                <label for="name" class="sr-only">작성자명</label>
                <input type="text" class="form-control" id="name" placeholder="작성자명">
              </div>
              <div class="form-group mx-sm-3 mb-2">
                <label for="password" class="sr-only">비밀번호</label>
                <input type="password" class="form-control" id="password" placeholder="비밀번호(문자와 숫자만 입력해주세요.)">
              </div>
              <button type="submit" class="btn btn-primary mb-2" onclick="posting()">작성완료</button>
            </div>
    </html>

     

    ../views/comment.ejs 게시글 조회 페이지

    <!DOCTYPE html>
    <html lang="en">
      <head>
        <!-- Required meta tags -->
        <meta charset="utf-8" />
        <meta
          name="viewport"
          content="width=device-width, initial-scale=1, shrink-to-fit=no"
        />
        <link rel="icon" href="/static/favicon.ico" type="image/x-icon" />
        <link rel="shortcut icon" href="/static/favicon.ico" type="image/x-icon" />
        <!-- Bootstrap CSS -->
        <link
          rel="stylesheet"
          href="https://cdn.jsdelivr.net/npm/bootstrap@4.5.3/dist/css/bootstrap.min.css"
          integrity="sha384-TX8t27EcRE3e/ihU7zmQxVncDAy5uIKz4rEkgIXeMed4M0jlfIDPvg6uqKI2xXr2"
          crossorigin="anonymous"
        />
    
        <!-- Font Awesome CSS -->
        <link
          href="//maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css"
          rel="stylesheet"
        />
        <!-- Optional JavaScript -->
        <!-- jQuery first, then Popper.js, then Bootstrap JS -->
        <script
          src="https://code.jquery.com/jquery-3.5.1.js"
          integrity="sha256-QWo7LDvxbWT2tbbQ97B53yJnYU3WhH/C8ycbRAkjPDc="
          crossorigin="anonymous"
        ></script>
        <script
          src="https://cdn.jsdelivr.net/npm/popper.js@1.16.1/dist/umd/popper.min.js"
          integrity="sha384-9/reFTGAW83EW2RDu2S0VKaIzap3H66lZH81PoYlFhbGU+6BZp6G7niu735Sk7lN"
          crossorigin="anonymous"
        ></script>
        <script
          src="https://cdn.jsdelivr.net/npm/bootstrap@4.5.3/dist/js/bootstrap.min.js"
          integrity="sha384-w1Q4orYjBQndcko6MimVbzY0tgp4pWB4lZ7lr30WKz0vr/aWKhXdBNmNb5D92v7s"
          crossorigin="anonymous"
        ></script>
        <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-cookie/1.4.1/jquery.cookie.js"></script>
        <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.24.0/moment.min.js"></script>
    
        
        <title>항해99 4기 3주차 개인 프로젝트</title>
    
        <style>
            .wrBox{
                margin: 10px auto;
                width: 1000px;
                margin: 150px auto;
            }
        </style>
    
        <script>
            $(document).ready(function () {
                get_comment()
            })
    
          function get_comment() {
        $.ajax({
          type: "GET",
          url: `/api/posts/<%= name["name"] %>`,
          data: {},
          success: function (response) {
            console.log(response)
            let posts = response["posts"]
    
            let date = moment(posts['date']).format('YYYY-MM-DD HH:mm')
    
            $("#title").val(posts['title'])
            $("#name").val(posts['name'])
            $("#content").val(posts['content'])
            $("#date").val(date)
          }
        });
      }
    
      function updating(posts) {
        location.href="/update/<%= name['name'] %>"
      }
        </script>
      </head>
    
      <body>
          <div class="wrBox">
            <div class="form-group">
              <label for="title">제목</label>  
              <input type="text" class="form-control" id="title" readonly>
              </div>
              <div class="form-group">
                <label for="date">날짜</label>  
                <input type="text" class="form-control" id="date" readonly>
                </div>
              <div class="form-group">
                <label for="content">내용</label>
                <textarea class="form-control" id="content" rows="10" readonly></textarea>
              </div>
              <div class="form-group mx-sm-3 mb-2">
                <label for="name" class="sr-only">작성자명</label>
                <input type="text" class="form-control" id="name" readonly>
              </div>
              <a type="button" class="btn btn-info" onclick="updating()" >수정하기</a>
              <button type="button" class="btn btn-primary" onclick="window.location.href='/home'" >뒤로가기</a></button>
            </div>
    </html>

     

    ../views/update.ejs 게시글 수정 페이지

    <!DOCTYPE html>
    <html lang="en">
    
    <head>
        <!-- Required meta tags -->
        <meta charset="utf-8" />
        <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />
        <link rel="icon" href="/static/favicon.ico" type="image/x-icon" />
        <link rel="shortcut icon" href="/static/favicon.ico" type="image/x-icon" />
        <!-- Bootstrap CSS -->
        <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.5.3/dist/css/bootstrap.min.css"
            integrity="sha384-TX8t27EcRE3e/ihU7zmQxVncDAy5uIKz4rEkgIXeMed4M0jlfIDPvg6uqKI2xXr2" crossorigin="anonymous" />
    
        <!-- Font Awesome CSS -->
        <link href="//maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet" />
        <!-- Optional JavaScript -->
        <!-- jQuery first, then Popper.js, then Bootstrap JS -->
        <script src="https://code.jquery.com/jquery-3.5.1.js"
            integrity="sha256-QWo7LDvxbWT2tbbQ97B53yJnYU3WhH/C8ycbRAkjPDc=" crossorigin="anonymous"></script>
        <script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.1/dist/umd/popper.min.js"
            integrity="sha384-9/reFTGAW83EW2RDu2S0VKaIzap3H66lZH81PoYlFhbGU+6BZp6G7niu735Sk7lN"
            crossorigin="anonymous"></script>
        <script src="https://cdn.jsdelivr.net/npm/bootstrap@4.5.3/dist/js/bootstrap.min.js"
            integrity="sha384-w1Q4orYjBQndcko6MimVbzY0tgp4pWB4lZ7lr30WKz0vr/aWKhXdBNmNb5D92v7s"
            crossorigin="anonymous"></script>
        <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-cookie/1.4.1/jquery.cookie.js"></script>
        <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.24.0/moment.min.js"></script>
    
        <title>항해99 4기 3주차 개인 프로젝트</title>
    
        <style>
            .wrBox {
                margin: 10px auto;
                width: 1000px;
                margin: 150px auto;
            }
        </style>
    
        <script>
            $(document).ready(function () {
                get_update()
            })
    
            function get_update() {
                $.ajax({
                    type: "GET",
                    url: `/api/posts/<%= name["name"] %>`,
                    data: {},
                    success: function (response) {
                        console.log(response)
                        let posts = response["posts"]
    
                        let date = moment(posts['date']).format('YYYY-MM-DD HH:mm')
    
                        $("#title").val(posts['title'])
                        $("#name").val(posts['name'])
                        $("#content").val(posts['content'])
                        $("#date").val(date)
                    }
                });
            }
    
            function updating() {
                $.ajax({
                    type: "PATCH",
                    url: `/api/posts/<%= name["name"] %>`,
                    data: {
                        title: $("#title").val(),
                        content: $("#content").val(),
                        password: $("#password").val(),
                    },
                    success: function (response) {
                        if (response["result"] == "success") {
                            alert("수정완료");
                            window.location.href = "/home"
                        }
                        else {
                            alert("비밀번호를 확인해주세요.")
                        }   
                    }
                });
            }
    
            function remove(){
                $.ajax({
                    type: "DELETE",
                    url: `/api/posts/<%= name["name"] %>`,
                    data: {
                        password: $("#password").val()
                    },
                    success: function (response) {
                        console.log(response)
                        if (response["result"] == "success") {
                            alert("삭제완료");
                            window.location.href = "/home"
                        } else {
                            alert("비밀번호를 확인해주세요.")
                        }
                    }
                });
            }
            
            function back() {
                location.href = "javascript:history.back();"
            }
        </script>
    </head>
    
    <body>
        <div class="wrBox">
            <div class="form-group">
                <label for="title">제목</label>
                <input type="text" class="form-control" id="title">
            </div>
            <div class="form-group">
                <label for="date">날짜</label>
                <input type="text" class="form-control" id="date">
            </div>
            <div class="form-group">
                <label for="content">내용</label>
                <textarea class="form-control" id="content" rows="10"></textarea>
            </div>
            <div class="form-group mx-sm-3 mb-2">
                <label for="name" class="sr-only">작성자명</label>
                <input type="text" class="form-control" id="name">
            </div>
            <div class="form-group mx-sm-3 mb-2">
                <label for="password" class="sr-only">비밀번호</label>
                <input type="password" class="form-control" id="password" placeholder="비밀번호 확인(문자와 숫자만 적어주세요.)">
            </div>
            <button type="submit" class="btn btn-success mb-2" onclick="updating()">수정완료</button>
            <button type="button" class="btn btn-danger mb-2" onclick="remove()">삭제하기</button>
            <button type="button" class="btn btn-primary mb-2" onclick="back()">돌아가기</button>
        </div>
    
    </html>

     

     

     

     

    1.  RESTful API

    RESTful은 일반적으로 REST라는 아키텍처를 구현하는 웹 서비스를 나타내기 위해 사용되는 용어이다.
    ‘REST API’를 제공하는 웹 서비스를 ‘RESTful’하다고 할 수 있다.

     

    RESTful 하지 못한 경우

    • CRUD 기능을 모두 POST로만 처리하는 API
    • route에 resource, id 외의 정보가 들어가는 경우(/students/updateName)

    CRUD

     

    C reate : 생성 - POST
    R ead   : 조회 - GET
    U pdate : 수정 - PUT, PATCH
    D elete : 삭제 - DELETE

     

     

    2.  package.json

    1. 파일은 기본적으로 CommonJS의 명세를 충실히 따르고 있으며 JSON 형식의 파일이다.
    2. 배포한 모듈 정보를 담고자 만들어졌지만, 노드로 작성하는 애플리케이션도 package.json 파일을 사용하여 관리할 수 있다.
    3. 꼭 확장 모듈 형태로 배포하기 위한 것이 아니더라도 애플리케이션을 개발할 때 package.json 파일을 이용하면 사용하는 확장 모듈에 대한 의존성 관리가 가능하기 때문에 편리하다. 

    프로젝트에 대한 명세

    {
      "name": "3week",
      "version": "1.0.0",
      "description": "",
      "main": "index.js",
      "scripts": {
        "start": "nodemon index.js"
      },
      "keywords": [],
      "author": "",
      "license": "ISC"
      }
    • package name - 프로젝트의 이름으로 제일 중요하며 배포할 때 version과 함께 필수다.
    • version - 프로젝트 버전을 정의함.
    • description - 프로젝트 설명이고 문자열로 나타낸다.
    • keywords - 프로젝트 검색할때 참조가 됨.
    • author - 프로젝트 작성자 정보로 한 사람만을 지정함. JSON 형식으로 name, email, url 옵션을 포함한다.
    • license - 패키지를 사용하기 위해서 어떻게 권한을 얻었고, 어떤 금기사항이 있는지 알기 위해서 라이센스를 명시해야 된다.

     

     

    3.  3주차 소감

    3주차에 접어들면서 내가 선택한 주특기 언어인 Node.js에 대해서 기본과 숙련,심화를 알기 위해서 총 3주간 강의를 듣고, 1주일에 한 번 씩

    개인 프로젝트를 제출을 해야한다. 주특기 주차의 첫 주인 이번 주는 기초를 다지기 위해서 많은 요구사항이 없는? 개인 프로젝트를 만들게 됐다.

     

    진짜 너무 어려웠다. 그 전에 했던 것들도 어려웠는데 이 언어를 이용해서 코드를 짜려니까 너무 어려웠다. 근데 다른 분들은 잘 진행해 나가고 있어서 좌절을 했지만, 그 분들은 전에 다른 언어로도 코딩을 해본 경험이 있거나, 현업에 종사해보셨던 분들이었다.

     

    팀원 분들께서는 내가 느끼고 있는 좌절감을 본인들은 일찍 겪었을 뿐 천천히 해나가면 된다는 위로를 받고, 나도 가만히 있지는 못해서 뼈대 부터 구성을 하고, 다 봤던 강의를 모르거나 필요한 것들을 다시 들어보기도 했는데 직접 코드를 써내려가니까 전에 했던 flask와 구성?이 비슷했다.

     

    하다가 막히는 부분에 있어서 팀원 분들께 SOS를 요청했는데, 팀원 분이 알려주신거와 비슷하게 한 것 같은데 내껀 안되고, 팀원분이 알려주신 코드에 대해서 실행이 잘 됐다.

     

    막히는 부분이 생각보다 많아서 팀원 분들께 도움을 요청을해서 너무 죄송해서 여쭤볼때마다 죄송하다는 말을 달고 프로젝트를 진행한 것 같다. 하지만 돌아오는 답은 당연히 모를 수 밖에 없고, 이건 경쟁이 아니니까 좌절하지말고 언제든지 물어보라는 말씀에 너무 감사드렸다.

     

    결국에는 좋은 팀원 분들을 만나뵙게돼서 나는 운이 좋은 사람이라고 생각했다. 솔직히 1주차, 2주차, 3주차 팀원 분들도 정말 좋은 분들이였다. 나는 어쩌면 정말 운이 좋을 지도 모른다.

     

    이제 곧 다가올 4주차 주특기 숙련 주차에서도 열심히 해서 나도 남을 도울 수 있는 사람이 되고 싶다. 항상 열심히 해야겠다.

     

     

Designed by Tistory.