• 로그인
  • 장바구니에 상품이 없습니다.

home2 게시판 Node.js, Express 게시판 Could not shutdown sub process cleanly

Could not shutdown sub process cleanly

2 글 보임 - 1 에서 2 까지 (총 2 중에서)
  • 글쓴이
  • #61786

    최아성
    참가자
    [nodemon] Could not shutdown sub process cleanly 
    라는 에러가 계속 뜨는데 구글링해봐도 잘 안나와서요..왜이런 걸까요
    처음 한번 nodemon 시작할때는 오류가 안나는데
    다시 수정하면 오류가 떠서요ㅠㅠ
    const express = require('express');
    const app = express();
    const bodyParser = require('body-parser');
    app.use(bodyParser.urlencoded({extended: true}));
    const MongoClient = require('mongodb').MongoClient;
    app.set('view engine', 'ejs');
    MongoClient.connect('mongodb+srv://@cluster0.wtbbxyj.mongodb.net/?retryWrites=true&w=majority', function(에러, client){
        if(에러){return console.log(에러)};
        db = client.db('todoapp');
        app.listen(7777, function(요청, 응답){
            console.log('listening on 7777');
        });
    });
    app.get('/', function(요청, 응답){
        응답.sendFile(__dirname + '/index.html');
    });
    app.get('/write', function(요청, 응답){
        응답.sendFile(__dirname + '/write.html');
    });
    app.post('/add', function(요청, 응답){
        응답.send('전송완료');
        db.collection('post').insertOne( { 제목 : 요청.body.title, 날짜 : 요청.body.date } , function(){
          console.log('저장완료');
        });
      });
    app.get('/list', function(요청, 응답){
        db.collection('post').find().toArray(function(에러, 결과){
            console.log(결과);
            응답.render('list.ejs', { posts : 결과 });
        });
    });
    #61806

    codingapple
    키 마스터
    컴퓨터에 이상한 보안 프로그램, 개발 프로그램 끄거나 
    컴퓨터 재시작합시다
2 글 보임 - 1 에서 2 까지 (총 2 중에서)
  • 답변은 로그인 후 가능합니다.

About

현재 월 700명 신규수강중입니다.

  (09:00~20:00) 빠른 상담은 카톡 플러스친구 코딩애플 (링크)
  admin@codingapple.com
  이용약관
ⓒ Codingapple, 강의 예제, 영상 복제 금지
top

© Codingapple, All rights reserved. 슈퍼로켓 에듀케이션 / 서울특별시 강동구 고덕로 19길 30 / 사업자등록번호 : 212-26-14752 온라인 교육학원업 / 통신판매업신고번호 : 제 2017-서울강동-0002 호 / 개인정보관리자 : 박종흠