Hi, Sagar, i was trying to implement Nodejs App with Mysql to build it serverless following your article, i get this error.
Serverless: Configuration warning at 'provider.runtime': should be equal to one of the allowed values [dotnetcore2.1, dotnetcore3.1, go1.x, java11, java8, java8.al2, nodejs10.x, nodejs12.x, provided, provided.al2, python2.7, python3.6, python3.7, python3.8, ruby2.5, ruby2.7]
i use below versions
Angular:- 10.1.2
Node:- 12.18.0
Mysql:- 8.0.17
please help me with the above error, i have followed same steps as mentioned in your article. (excepts for db config password)
Software engineer with 4+ years of experience in building products for numerous domains like fin-tech, real estate, video streaming, retail, and now e-commerce.
Software engineer with 4+ years of experience in building products for numerous domains like fin-tech, real estate, video streaming, retail, and now e-commerce.
Hi, i had crossed checked function code blocks with article code blocks, its the same.
Can please tell me why console statements arent printing, it should print right ?
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Hi, Sagar, i was trying to implement Nodejs App with Mysql to build it serverless following your article, i get this error.
Serverless: Configuration warning at 'provider.runtime': should be equal to one of the allowed values [dotnetcore2.1, dotnetcore3.1, go1.x, java11, java8, java8.al2, nodejs10.x, nodejs12.x, provided, provided.al2, python2.7, python3.6, python3.7, python3.8, ruby2.5, ruby2.7]
i use below versions
Angular:- 10.1.2
Node:- 12.18.0
Mysql:- 8.0.17
please help me with the above error, i have followed same steps as mentioned in your article. (excepts for db config password)
basically, you need to provide runtime in the serverless.yml file.
Hi Sagar,
Thank you for sharing, upon changing serverless.yml runtime to nodejs12.x, i am not getting the error i mentioned in previous comment.
I am attaching screenshots of calling API in postman i dont get response as shown in your article, and get pokemon by id API doesnt work at all.
Please let me knoew how to get data of API correctly.
dev-to-uploads.s3.amazonaws.com/i/...
dev-to-uploads.s3.amazonaws.com/i/...
Also, I tried to debug by putting console statements in index.js file API's but console statements are not printed in BE.
app.get('/pokemon/', (req, res) => {
const query = 'SELECT * FROM pokemon_tb'
pool.query(query, (err, results, fields) => {
if (err) {
const response = { data: null, message: err.message, }
console.log('***********', response);
res.send(response)
}
})
please tell me why ?
IDK exact reason behind this. you need crosscheck function with the article mention code blocks and also you've to debug the root cause of this.
Hi, i had crossed checked function code blocks with article code blocks, its the same.
Can please tell me why console statements arent printing, it should print right ?