DEV Community

Build a simple app using Node JS and MySQL.

Prince on June 23, 2018

Hello world!. In this tutorial, we are going to build a simple CRUD application using Node JS and MySQL. What we will build? The imag...
Collapse
 
kowalsk profile image
kowalsk

Hi Atauba,

I followed your tutorial and have the following error. Do you have any clues as to why this is so:

C:\Users\PC\OneDrive\Coding\JS\node-mysql-crud-app>nodemon app.js
[nodemon] 1.18.10
[nodemon] to restart at any time, enter rs
[nodemon] watching: .
[nodemon] starting node app.js
C:\Users\PC\OneDrive\Coding\JS\node-mysql-crud-app\routes\index.js:11
title: Welcome to Socka | View Players
^^

SyntaxError: Unexpected identifier
at new Script (vm.js:79:7)
at createScript (vm.js:251:10)
at Object.runInThisContext (vm.js:303:10)
at Module._compile (internal/modules/cjs/loader.js:656:28)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:699:10)
at Module.load (internal/modules/cjs/loader.js:598:32)
at tryModuleLoad (internal/modules/cjs/loader.js:537:12)
at Function.Module._load (internal/modules/cjs/loader.js:529:3)
at Module.require (internal/modules/cjs/loader.js:636:17)
at require (internal/modules/cjs/helpers.js:20:18)
[nodemon] app crashed - waiting for file changes before starting...
^CTerminate batch job (Y/N)? y

Collapse
 
wolgensinger profile image
wolgensinger

I have the same error on line 11. Do you have any hints or a solution? Thank you for a short reply.

Collapse
 
nitesh146 profile image
Nitesh Kesarkar

Try adding the "" for the title values wherever this error shows.

Collapse
 
achowba profile image
Prince • Edited

Hi, sorry for the late reply, check if all brackets/braces have been closed and ensure you added the comma after the title key in the res.render function of the index.js file.

Collapse
 
tjs1990hub profile image
tjs1990-hub

Hi i have also got this error, i have re written the file to make sure all brackets are closed and that the comma is in the right place i have even tried making it an if else statement but still can't get it to run. Any help would be greatly appreciated.

Collapse
 
bhargavm119 profile image
Bhargav muppidi

Hi Atauba,

I am Find following error while execting the code

SyntaxError: Unexpected identifier in C:\Users\bharg\OneDrive\Desktop\Project\Project\node-mysql-crud-app\views\index.ejs while compiling ejs

If the above error is not helpful, you may want to try EJS-Lint:
github.com/RyanZim/EJS-Lint
Or, if you meant to create an async function, pass async: true as an option.
at new Function ()
at Template.compile (C:\Users\bharg\OneDrive\Desktop\Project\Project\node-mysql-crud-app\node_modules\ejs\lib\ejs.js:626:12)
at Object.compile (C:\Users\bharg\OneDrive\Desktop\Project\Project\node-mysql-crud-app\node_modules\ejs\lib\ejs.js:366:16)
at handleCache (C:\Users\bharg\OneDrive\Desktop\Project\Project\node-mysql-crud-app\node_modules\ejs\lib\ejs.js:215:18)
at tryHandleCache (C:\Users\bharg\OneDrive\Desktop\Project\Project\node-mysql-crud-app\node_modules\ejs\lib\ejs.js:254:16)
at View.exports.renderFile as engine
at View.render (C:\Users\bharg\OneDrive\Desktop\Project\Project\node-mysql-crud-app\node_modules\express\lib\view.js:135:8)
at tryRender (C:\Users\bharg\OneDrive\Desktop\Project\Project\node-mysql-crud-app\node_modules\express\lib\application.js:640:10)
at Function.render (C:\Users\bharg\OneDrive\Desktop\Project\Project\node-mysql-crud-app\node_modules\express\lib\application.js:592:3)
at ServerResponse.render (C:\Users\bharg\OneDrive\Desktop\Project\Project\node-mysql-crud-app\node_modules\express\lib\response.js:1012:7)

Pls do help me ,

Thanks in advance
Bhargav

Collapse
 
frames75 profile image
frames

Same error here.

Collapse
 
siddm22 profile image
Siddhant Misra

Same error here. Any fix for this?

Thread Thread
 
alprvi profile image
alprvi

try this:

<%- include ('partials/header.ejs'); -%>

Thread Thread
 
mdagley profile image
Melissa Dagley

Thanks, I was having the same problem and this solved it for me.

Thread Thread
 
richiebutau profile image
butau richmond

Worked for me too

Thread Thread
 
daliaalziani profile image
daliaalziani

i tried it too but it is not working at all

Thread Thread
 
reemaalwail profile image
Reem yahea ali

i am same what is solution bro ?

Collapse
 
fzkd554m profile image
Marco

Hi Atauba!
Great guide, very good!
I have this error:
{"errno":-4058,"code":"ENOENT","syscall":"open","path":"C:\WebTest\public\assets\img\photo1.jpeg"}
when I add new PLAYER.
In img folder I've copied three photo .jpeg
Where is the problem?

Collapse
 
fzkd554m profile image
Marco

Acc..
I found the error, sorry...

Collapse
 
amirfs profile image
amir

i have same problem how you fixed it? i have checked every things

Thread Thread
 
amirfs profile image
amir

my problem solved

Collapse
 
mohamadalibrahim profile image
mohamad-alibrahim

can you please write the fixing?

Thread Thread
 
m23leung profile image
Mark Leung

U need to create the public/assets/img folder path. Just create the folder structure. Then, the error should go away.

Collapse
 
lexandra987 profile image
lexandra987

Hi, I have a problem:

TypeError: C:\players\node-mysql-crud-app\views\index.ejs:18
16|

17|                 <tbody>

18| <% players.forEach((player) => { %>

19|                         <tr>

20|                             <th scope="row"><%= player.id %></th>

21|                             <td><img src="/assets/img/<%= player.image %>" class="rounded-circle player-img" alt=""></td>

players.forEach is not a function
at eval (eval at compile (C:\players\node-mysql-crud-app\node_modules\ejs\lib\ejs.js:618:12), :28:16)
at returnedFn (C:\players\node-mysql-crud-app\node_modules\ejs\lib\ejs.js:653:17)
at tryHandleCache (C:\players\node-mysql-crud-app\node_modules\ejs\lib\ejs.js:251:36)
at View.exports.renderFile as engine
at View.render (C:\players\node-mysql-crud-app\node_modules\express\lib\view.js:135:8)
at tryRender (C:\players\node-mysql-crud-app\node_modules\express\lib\application.js:640:10)
at Function.render (C:\players\node-mysql-crud-app\node_modules\express\lib\application.js:592:3)
at ServerResponse.render (C:\players\node-mysql-crud-app\node_modules\express\lib\response.js:1016:7)
at Query.db.query (C:\players\node-mysql-crud-app\routes\index.js:10:17)
at Query. (C:\players\node-mysql-crud-app\node_modules\mysql\lib\Connection.js:525:10)

How can I fix it?

BR,
Aleksandra

Collapse
 
edensharvit profile image
EDEN SHARVIT

Can u tell us how did u manage to fix your issue?
I'm also stuck with the same error....

Collapse
 
albertgabiro profile image
Gabiro Albert • Edited

hy i have same question online 18

how did you fix it
please help

Collapse
 
rafad900 profile image
rafad900

One of the things that you can check is in inside /routes/index.js
Make sure that the players: result is not in any quotes.
foreach is a function of arrays. If you have 'result', that is a string.

Collapse
 
lexandra987 profile image
lexandra987

but ok, it was no question. it was just a stupid error in my index.ejs file. Now it works! :)

Collapse
 
dikshabhattacharjee profile image
dikshabhattacharjee

How did you fix it.please help..

Collapse
 
coolnin profile image
coolnin

I am getting the same problem what u did?

Thread Thread
 
udayparekh2006 profile image
Uday Parekh

Have you got a solution?

Thread Thread
 
dikshabhattacharjee profile image
dikshabhattacharjee

Any solution?

Collapse
 
rajesh996 profile image
Rajesh Chittampally • Edited

I have created a node & mysql app following this tutorial. It's all good but when i open the image, the image is not opening. all images size is 0 bytes only. Seeing broken image in browser too.

Collapse
 
achowba profile image
Prince

Sorry about that, I think these may be the possible reasons

  1. The SQL statement
  2. The image url. Check the console of your browser if any errors exist
Collapse
 
diegoeroque profile image
Diego Roque

Same problem here. Any solution??

Best Rgs.

Collapse
 
almck profile image
Al-mck

Hello

I change the first line by :
fs.writeFile(public/assets/img/${image_name},uploadedFile.data, function (err) {...

And it's work for me

Thread Thread
 
diegoeroque profile image
Diego Roque

thanks my friend. now work!!

Best Rgs.

Collapse
 
polarfoxoff profile image
PolarFoxOFF

Hello, I tried activating app.js and it works, but when I tried to access my localhost: 5000, it happened

SyntaxError: Unexpected identifier in /Users/apple/Documents/NodeJS/views/index.ejs while compiling ejs

If the above error is not helpful, you may want to try EJS-Lint:
github.com/RyanZim/EJS-Lint
Or, if you meant to create an async function, passasync: trueas an option.
at new Function ()
at Template.compile (/Users/apple/Documents/NodeJS/node_modules/ejs/lib/ejs.js:626:12)
at Object.compile (/Users/apple/Documents/NodeJS/node_modules/ejs/lib/ejs.js:366:16)
at handleCache (/Users/apple/Documents/NodeJS/node_modules/ejs/lib/ejs.js:215:18)
at tryHandleCache (/Users/apple/Documents/NodeJS/node_modules/ejs/lib/ejs.js:254:16)
at View.exports.renderFile as engine
at View.render (/Users/apple/Documents/NodeJS/node_modules/express/lib/view.js:135:8)
at tryRender (/Users/apple/Documents/NodeJS/node_modules/express/lib/application.js:640:10)
at Function.render (/Users/apple/Documents/NodeJS/node_modules/express/lib/application.js:592:3)
at ServerResponse.render (/Users/apple/Documents/NodeJS/node_modules/express/lib/response.js:1012:7)
SyntaxError: Unexpected identifier in /Users/apple/Documents/NodeJS/views/index.ejs while compiling ejs

Collapse
 
justicebringer profile image
Gabriel

I believe you tried an include but you may have written it bad. Try to write it like this:

<%- include ("../fragments/header") %>

Collapse
 
hridoy100 profile image
Raihanul Alam Hridoy

Inside index.ejs file add this in line 1:
<%- include("partials/header") -%>

Collapse
 
siddm22 profile image
Siddhant Misra

Same error here. Any fix for this?

Collapse
 
zzrez profile image
zzrez

I just completed this useful tutorial, thanks. In the process I had to solve some bugs which may be because versions of packages, eg express, have changed.

This bug (frequently mentioned below): "SyntaxError: Unexpected identifier". This is due to use of "<% include partials/header.ejs %>" at the top of the ejs files. If this is replaced by the original html of header.ejs, all works. So the required inclusion format seems to have changed for Express 4.x to:- "<%- include ('partials/header') %>"

Then there are various places with "title: Welcome to Socka | View Players" or similar, the value "Welcome to Socka | View Players" needs enclosing in single or double quotes.

Finally, the add form works if the directory for images, /public/assets/img, is first created.

Hope this helps. Great tutorial!

Collapse
 
silverbackjack1 profile image
silverbackjack1 • Edited

Great guide, very useful.

I'm looking to create something similar using this as a starting point but I'm struggling to remove the image upload requirement, it's not something I need. Could you give any advice on how to remove this requirement? I've encountered a few issues when trying to change this code.

Thanks in advance

Never mind, I figured it out :)

Collapse
 
achowba profile image
Prince

Okay but note that the code is susceptible to SQL injection, I have been quite lazy about fixing and updating it on the repo 😩.

Anyways, thanks for the kind words.

Collapse
 
abhinavsingh1995 profile image
abhinavsingh1995 • Edited

adding players is not working.It is not giving any error.
I tried to add player, once i open the add player page/form AND some player information it shows this after submitting
{
"errno":-2,
"code":"ENOENT",
"syscall":"open",
"path":"public/assets/img/user.png"
}
and when i went back to homepage no player is added.

Collapse
 
achowba profile image
Prince

This could be from the addPlayer.js function or the path to the store the image does not exist, kindly crosscheck and try again.

Collapse
 
mohamadalibrahim profile image
mohamad-alibrahim

i have encounterd in the same issue, how it would be solved?

Collapse
 
mdagley profile image
Melissa Dagley

This happened to me when I didn't have the directory created for the image.

Collapse
 
kl4532 profile image
kl4532

Hi!
I get error after clicking 'Add a Player'. Here is the output:

ReferenceError: /home/corny/dev/node/node-msql-crud-app/views/add-player.ejs:7
5| <% } %>
6|

7| <% if (player) { %>
8|


9|
10|

player is not defined
at eval (eval at compile (/home/corny/dev/node/node-msql-crud-app/node_modules/ejs/lib/ejs.js:618:12), :34:8)
at returnedFn (/home/corny/dev/node/node-msql-crud-app/node_modules/ejs/lib/ejs.js:653:17)
at tryHandleCache (/home/corny/dev/node/node-msql-crud-app/node_modules/ejs/lib/ejs.js:251:36)
at View.exports.renderFile as engine
at View.render (/home/corny/dev/node/node-msql-crud-app/node_modules/express/lib/view.js:135:8)
at tryRender (/home/corny/dev/node/node-msql-crud-app/node_modules/express/lib/application.js:640:10)
at Function.render (/home/corny/dev/node/node-msql-crud-app/node_modules/express/lib/application.js:592:3)
at ServerResponse.render (/home/corny/dev/node/node-msql-crud-app/node_modules/express/lib/response.js:1008:7)
at addPlayerPage (/home/corny/dev/node/node-msql-crud-app/routes/player.js:5:13)
at Layer.handle as handle_request

================
Can you help me?

BR,
Corny

Collapse
 
achowba profile image
Prince

Hello, sorry about the error, kindly check the add-player.ejs and edit-player.ejs files to confirm everything checks out and then try again.

Collapse
 
kl4532 profile image
kl4532

My god, I switched files contents... I am an idiot. Thank you for help and great tutorial.

BR,
Corny

Thread Thread
 
achowba profile image
Prince

😂 Oh okay. No problem

Collapse
 
parthp7493 profile image
Parth Parikh • Edited

Hello
I have followed your tutorial and i got error "Unexpected identifier in C:\Users\Admin\Desktop\circAdmin\views\dashboard.ejs while compiling ejs".
Please open the below link.

thepracticaldev.s3.amazonaws.com/i...

Collapse
 
siddm22 profile image
Siddhant Misra

Same error here. Any fix for this?

Collapse
 
anjemaaars profile image
Angel Marcelino

Hello, in case you are still looking for answers

all code snippets like this

<% include partials/header.ejs %>

change it into

<% include ('header') %>

Collapse
 
maityhitesh91 profile image
Hitesh Maity • Edited

Hi Atauba,

I am following your tutorial. after successfull running command I am getting below error in the browser.

SyntaxError: missing ) after argument list in H:\node_project\views\index.ejs while compiling ejs

If the above error is not helpful, you may want to try EJS-Lint:
github.com/RyanZim/EJS-Lint
Or, if you meant to create an async function, pass async: true as an option.
at new Function ()
at Template.compile (H:\node_project\node_modules\ejs\lib\ejs.js:649:12)
at Object.compile (H:\node_project\node_modules\ejs\lib\ejs.js:385:16)
at handleCache (H:\node_project\node_modules\ejs\lib\ejs.js:233:18)
at tryHandleCache (H:\node_project\node_modules\ejs\lib\ejs.js:272:16)
at View.exports.renderFile as engine
at View.render (H:\node_project\node_modules\express\lib\view.js:135:8)
at tryRender (H:\node_project\node_modules\express\lib\application.js:640:10)
at Function.render (H:\node_project\node_modules\express\lib\application.js:592:3)
at ServerResponse.render (H:\node_project\node_modules\express\lib\response.js:1012:7)

Collapse
 
muhywale profile image
Lil_muhy

exact prob. I'm encountering. Any solution now

Collapse
 
mj0lken profile image
mj0lken

I'm new to this and I get an awful error. Did it from scratch and cloned your repo but still got this in my terminal:

..../node-mysql-crud-app/node_modules/mysql/lib/protocol/Parser.js:80
throw err; // Rethrow non-MySQL errors

^

any clues!?

Collapse
 
shanegibney profile image
Shane Gibney • Edited

mj0lken this error suggests that your database credentials in app.js are not correct. Check them. I realise you asked this question many months ago and have probably fixed it by now.

Collapse
 
achowba profile image
Prince

Hello, could you please send a picture of your console with the error so I can know where the error is coming from

Collapse
 
jojacino profile image
Joseph Davidson • Edited

I don't know if Atauba is aware of this but there is a simple error if you direct copy the instructions. There may need to be quotes added to line 12 in player.js. They correct line might show: title: 'Welcome to Socka | Add a new player',

There were about five lines akin to that.

Other than that it works really well! =)

Collapse
 
diegoeroque profile image
Diego Roque

When upload image, in the folder /assets/img files was create, but empty (0 bytes).

Can you help me? Additional permission was required for the folder /assets/img?

Best Rgs.

Collapse
 
achowba profile image
Prince

Hello, sorry for the delayed reply. No additional permission was required for the folder and kindly compare this file with yours to ensure there are no errors in the addPlayer function.

Collapse
 
diegoeroque profile image
Diego Roque

it does not throw errors:

uploadedFile.mv(public/assets/img/${image_name}, (err ) => {
if (err) {
return res.status(500).send(err);
}

Collapse
 
diegoeroque profile image
Diego Roque

there are no differences.
the files are identical.
the files are created but 0 bytes.
Any suggestions?

Thread Thread
 
achowba profile image
Prince

I have no suggestions yet, but is it working?

Thread Thread
 
diegoeroque profile image
Diego Roque

Following the post of Al-mck....

I change the first line by :
fs.writeFile(public/assets/img/${image_name},uploadedFile.data, function (err) {...

and now it's working fine.

Best Rgs.

Collapse
 
kumarhondale profile image
Rajkumar Hondale • Edited

Hi Atauba,

I'm tring to learn node js, Your artical is so nice and esy to understan but i have the following error please help me to fix this issue.

Thanks

/var/www/html/node-mysql-crud-app/routes/index.js:11
title: Welcome to Socka | View Players,
^

SyntaxError: Unexpected identifier
at Module._compile (internal/modules/cjs/loader.js:760:23)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:827:10)
at Module.load (internal/modules/cjs/loader.js:685:32)
at Function.Module._load (internal/modules/cjs/loader.js:620:12)
at Module.require (internal/modules/cjs/loader.js:723:19)
at require (internal/modules/cjs/helpers.js:14:16)
at Object. (/var/www/html/node-mysql-crud-app/app.js:8:23)
at Module._compile (internal/modules/cjs/loader.js:816:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:827:10)
at Module.load (internal/modules/cjs/loader.js:685:32)

Collapse
 
kumarhondale profile image
Rajkumar Hondale

I found the answer.. Have to modified title like below.

Thanks

res.render('index.ejs', {
title: 'Welcome to Socka | View Players',
players: 'result'
});

Collapse
 
jprumekso profile image
Jalu Pujo Rumekso

Hi Atauba, congrats for writing a detailed tutorial.

FYI, you can also use Crudite to make CRUD operation even seamless. It wraps node-mysql2 query method into a neat promise-based create(), read(), update(), and delete() method. More info can be found at github.com/jprumekso/crudite

Collapse
 
codingstatus profile image
CodingStatus.com

This article is helpful by using with CRUD Operation in Expressjs with MVC Pattern in Express, But Let me know that How to send flash message after inserting, updating, or deleting the data

Collapse
 
apple24hrs93 profile image
APPLE 24Hrs

A VERY USEFUL POST, BUT I GET THIS ERROR EACH TIME TRY TO ADD A PLAYER :(

PD: I ONLY CHANGE "NUMBER" FOR "NUMBERO" ITS THE SAME

{"code":"ER_TRUNCATED_WRONG_VALUE_FOR_FIELD","errno":1366,"sqlMessage":"Incorrect integer value: 'undefined' for column 'numbero' at row 1","sqlState":"HY000","index":0,"sql":"INSERT INTO players (first_name, last_name, position, numbero, image, user_name) VALUES ('Joseph Bryan', 'Gonzalez Ruiz', 'Midfielder', 'undefined', 'code.jpeg', 'code')"}

Collapse
 
achowba profile image
Prince

Sorry for the delayed reply, I think you should also check the sql statement that creates the database and also change the "number" to "numbero"

Collapse
 
yaolaphilip profile image
philip yaola

Great Guide Prince. Though am a bit stuck:
title: Welcome to Socka | Add a new player
^

SyntaxError: Unexpected identifier
at new Script (vm.js:80:7)
at createScript (vm.js:274:10)
at Object.runInThisContext (vm.js:326:10)
at Module._compile (internal/modules/cjs/loader.js:664:28)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:712:10)
at Module.load (internal/modules/cjs/loader.js:600:32)
at tryModuleLoad (internal/modules/cjs/loader.js:539:12)
at Function.Module._load (internal/modules/cjs/loader.js:531:3)
at Module.require (internal/modules/cjs/loader.js:637:17)
at require (internal/modules/cjs/helpers.js:22:18)
//Am still getting the above error even after using:

res.render('index.ejs', {
title: "Welcome to Socka | View Players"
,players: result

Collapse
 
sydnyb profile image
sydnyb

Please help with erro .

// 20190518173531
// localhost:5000/add

{
"errno": -4058,
"code": "ENOENT",
"syscall": "open",
"path": "D:\Sites\Crud3\public\assets\img\syednayab.jpeg"
}

Collapse
 
fil2fip profile image
fil2fip

Hello,
Did not read and tried the full tutorial, but my first thinking is that I'd like to get rid of phpMyAdmin, and instead create the db and table(s) through Node.js and a script ....
In my mind, it would have been a better start !
Thank you.

Collapse
 
foofiggle profile image
Robert DiBetta

Hi Atauba,

Thanks for sharing this - it's a helpful example that I'm adapting as a loadtest target.

I noticed that a few changes might help mitigate SQL injection issues. If I get time, I might come back with a pull request...

Collapse
 
rashedronybd profile image
Rashedur Rahman

SyntaxError: Unexpected identifier
at Module._compile (internal/modules/cjs/loader.js:721:23)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:787:10)
at Module.load (internal/modules/cjs/loader.js:653:32)
at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
at Function.Module._load (internal/modules/cjs/loader.js:585:3)
at Module.require (internal/modules/cjs/loader.js:690:17)
at require (internal/modules/cjs/helpers.js:25:18)
at Object. (D:\Programming\node js\node-mysql-crud-app\app.js:9:78)
at Module._compile (internal/modules/cjs/loader.js:776:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:787:10)

D:\Programming\node js\node-mysql-crud-app>

I got stuck here..i need the solution very urgently..

btw thanks for your great guide

Collapse
 
bapro profile image
Baptiste Prophete

Hello, I'm new member I'm so happy to be part of you.
Thanks for this tutorial which is applied to my new goal for this new (learning nodejs). After I save all the tutorial files, everything work for me, only the delete function fails, I'm showing this error after click on delete botton :

{"errno":-4058,"code":"ENOENT","syscall":"unlink","path":"C:\node-mysql-crud-app\public\assets\img\${image}"}

Any help please ?

Collapse
 
thenicknash profile image
Nick Nash

I created an account just to tell you how phenomenal this article is. Clear instruction, great file tree structure. Thank you!

Collapse
 
shiranslouch profile image
ShiranSlouch

Hi, thanks for a great tutorial!
Maybe you can help me? I need to know how to it with PDF files (blob).
Do you have example for that?

Collapse
 
achowba profile image
Prince

Thanks, sorry for the delay in replying.
Sadly, I don't have any example concerning uploading pdf files.

Collapse
 
tsalira profile image
tsalira • Edited

Hey, great tutorial. Been looking all over the Internet for something just like this to introduce me to Node, Express and basic html in a simple way. Thanks.

Collapse
 
achowba profile image
Prince

You are welcome. I'm glad you liked it.

Collapse
 
davidfrafael profile image
David Fernández

Hi.

Are you aware this code is subject to SQL injection?

Collapse
 
achowba profile image
Prince

No, I totally forgot about it, I will look into solving it and make updates on the repo. Thanks for pointing it out.

Collapse
 
ma7eer profile image
Maher Alkendi

This was awesome to read! this article will help me with building my first node mysql app! thanks!

Collapse
 
murali474747 profile image
Murali Dharan

how to add pagination in nodejs same example

Collapse
 
xeusteerapat profile image
Teerapat Prommarak

Hi Atauba,
Thank you for an awesome tutorial!

Collapse
 
joewilson27 profile image
Joe Wilson

Hi pale! thanks for sharing,
I want to ask you how to adding some notifications into index.ejs
after we added, updated and deleted players?
I have modified the index.ejs with variable message and
sent the message parameters in every events in player.js

thank you

Collapse
 
frames75 profile image
frames • Edited

Thank you very much for this great tutorial. I've been practicing with it and I've adapted the access to the database to the Bookshelf ORM. Here is if someone wants to take a look: github.com/frames75/node-mysql-cru...

Collapse
 
b44rawat profile image
bhupender rawat

First of all, Thank-you for this amazing tutorial. I tried your application as example site for my docker nodejs container setup. I found some changes that need to be done before configuring under docker container. First i created "public/assets/img" because when i was uploading it is giving me some errors. After that, it is working fine. I setup my example project in my GitHub and i already gave full code credit in my GitHub account.
Below is my docker project using your code -
github.com/b44rawat/docker-project...

Collapse
 
pythems profile image
Oluwakanmi Samuel Oluwatemilorun

Hi ,
A quick one ,
How do I access the phpmyadmin dashboard ?
Thanks

Collapse
 
sampada41778199 profile image
sampada

Fabulous! Well said.
This was passed on to me by a colleague one notch up leadership from me. I know he has heard me question but this article really put it into perspective.
tech-assured.com/

Collapse
 
nitesh146 profile image
Nitesh Kesarkar

One of the best and in detail article. Thanks from India.

Collapse
 
coolnin profile image
coolnin • Edited

Hi,
I attached the snapshot of my error can someone help me?

Collapse
 
kiljab profile image
Kiljab Ioresuame

Hello, did you make any change to the database? I went through similar errors when I cloned the repo and run the server without creating the original table. I built the players table and then went thru the app analyzing the code and finally made my own app.

Collapse
 
shaavi profile image
shaavi

I started to learn nodejs today and this is the best tutorial in the world. I feel like I know more and I feel Im a nodejs pro now. Please upload more tutorials on MEAN stack also. Thanks a lot.

Collapse
 
achowba profile image
Prince

Thanks for the kind words. I am not very familiar with Angular JS but I can recommend taking a look at this tutorial on YouTube. It covers a lot about building an app using MEAN stack.

Collapse
 
shivanshugarg profile image
shivanshugarg • Edited

Hello sir.
I am facing an error in Index.ejs file. I have attached the snapshot of the error. Please help me out here. It will be a great help.

Collapse
 
achowba profile image
Prince

Hello, could you please you send a snapshot of the error?

Collapse
 
sulistyodendy profile image
Dendy B. Sulistyo

thank you for your great work.

Collapse
 
lemonerjonas profile image
lemoner

Hello and thank you for the tutorial. However, I can't get it to run. It keeps saying that there's missing ) and just can't find where it is. Can you help with this?

Collapse
 
albertgabiro profile image
Gabiro Albert • Edited

hi Atuaba

i had an error online 18
please help

Collapse
 
kiljab profile image
Kiljab Ioresuame

Hello, this is an awesome point to start for newbies like me. Thanks a lot for posting your work. Can you elaborate on how to reduce the SQL injection risk?

Cheers

Collapse
 
vinz1234dev profile image
vinz1234-dev

thanks .. great guide.. :)

Collapse
 
muhywale profile image
Lil_muhy

Im getting "cannot read property 'length' of undefined" error. i.e if(players.length > 0) in the index.ejs file.
I need help please

Collapse
 
muhywale profile image
Lil_muhy

Im getting "cannot read property 'length' of undefined" error. i.e if(players.length > 0) in the index.ejs file.
I need help please

Collapse
 
jagathgj profile image
jagathgj • Edited

Hi Could you please explain how to build this and copy to cpanel for a domain.? Thanks in advance