-
글쓴이글
-
2021년 7월 12일 16:14 #11449
김창규참가자안녕하세요 제가 구글클라우드를 이용하여 업로드 했던걸 다시 수정할 점이 보여서 재업로드를 하기위해 git init , git deploy를 다시 하였는데 재업로드가 안 돼어서 잘문드립니다. git init 과 git deploy를 입력 하기 전 입력해야 하는 다른 명령어가 있는건가요? 아래는 명령어를 입력시 나오는 출력문입니다.
Settings from your current configuration [default] are:
accessibility:
screen_reader: 'False'
compute:
region: asia-northeast2
zone: asia-northeast2-a
core:
account: 기존 이메일 적혀있는 곳
disable_usage_reporting: 'True'
project: shopproject-319605Pick configuration to use:
[1] Re-initialize this configuration [default] with new settings
[2] Create a new configuration
Please enter your numeric choice: 1Your current configuration has been set to: [default]
You can skip diagnostics next time by using the following flag:
gcloud init --skip-diagnosticsNetwork diagnostic detects and fixes local network connection issues.
Checking network connection...done.
Reachability Check passed.
Network diagnostic passed (1/1 checks passed).Choose the account you would like to use to perform operations for
this configuration:
[1] 기존 이메일 적혀있는 곳
[2] Log in with a new account
Please enter your numeric choice: 1You are logged in as: [기존 이메일 적혀있는 곳].
Pick cloud project to use:
[1] healthy-clock-267805
[2] nwitter-c7ba4
[3] plated-envoy-319403
[4] shopproject-319605
[5] Create a new project
Please enter numeric choice or text value (must exactly match list
item): 4Your current project has been set to: [shopproject-319605].
Your Google Cloud SDK is configured and ready to use!
* Commands that require authentication will use 기존 이메일 적혀있는 곳 by default
* Commands will reference projectshopproject-319605
by default
Rungcloud help config
to learn how to change individual settingsThis gcloud configuration is called [default]. You can create additional configurations if you work with multiple accounts and/or projects.
Rungcloud topic configurations
to learn more.Some things to try next:
* Run
gcloud --help
to see the Cloud Platform services you can interact with. And rungcloud help COMMAND
to get help on any gcloud command.
* Rungcloud topic --help
to learn about advanced features of the SDK like arg files and output formatting
PS C:\Users\user\OneDrive\바탕 화면\iamport-react-example-master> gcloud app deploy
Services to deploy:descriptor: [C:\Users\user\OneDrive\바탕 화면\iamport-react-example-master\app.yaml]
source: [C:\Users\user\OneDrive\바탕 화면\iamport-react-example-master]
target project: [shopproject-319605]
target service: [default]
target version: [20210712t154727]
target url: [https://shopproject-319605.dt.r.appspot.com]
target service account: [App Engine default service account]Do you want to continue (Y/n)? Y
2021년 7월 12일 17:10 #11452
codingapple키 마스터gcloud app deploy 그냥 이것만 하면 잘됩니다
여기에 에러메세지는 없어보이는데요 아마 구글클라우드 콘솔들어가면 에러메세지같은거 확인가능합니다
2021년 7월 12일 17:38 #11454
김창규참가자구글 클라우드에서 확인 해보니 아래와 같은 에러가 생겼습니다. 그런데 서버에서 동작시켜본 결과 정상 작동 하였습니다. 아래에는 에러 메세지와 에러가 나는 코드 부분입니다.
TypeError: Cannot read property 'replace' of undefined
//post 요청
//크립토 라이브러리를 이용하여 비밀번호를 암호화 하여 보관함
app.post('/Sign_up',function(req,rsp){
//전화번호 하이폰 적용
req.body.phone = req.body.phone.replace(/(^02.{0}|^01.{1}|[0-9]{3})([0-9]+)([0-9]{4})/,"$1-$2-$3")
console.log(req.body)
model.findOne({ id: req.body.id },function(err,result){
if(err) rsp.status(400).send({ message: '회원가입에 실패했습니다.' })
if(result){
return rsp.status(400).send({ message: '이미 존재하는 아이디 입니다.' })
}
if(!result){
crypto.randomBytes(64, (err, buf) => {
if(err) rsp.status(400).send({ message: '회원가입에 실패했습니다.' })
crypto.pbkdf2(req.body.pw, buf.toString('base64'), 123121, 64, 'sha512', (err, key) => {
if(err) rsp.status(400).send({ message: '암호화에 실패했습니다.' })
const user = new model({
_id: new mongoose.Types.ObjectId(),
id: req.body.id,
pw: key.toString('base64'),
name : req.body.name,
phone: req.body.phone,
salt: buf.toString('base64'),
});
user.save()
.then(() => {
return rsp.status(200).send({ message: '회원가입에 성공했습니다.' })
})
.catch((err) => {
return rsp.status(400).send({ messgae: '가입에 실패했습니다 다시 시도해 주십시오',error: err })
})
});
});
}
})
});2021년 7월 12일 20:20 #11459
codingapple키 마스터req.body.phone이 숫자거나 아니면 undefined라서 replace()를 붙일 수 없다는 것 같군요
req.body.phone.toString().replace() 이런건 어떨까요
-
글쓴이글
- 답변은 로그인 후 가능합니다.