Jump to content

Need help with Node.js ! asap

feisi200

Howdy fellas, i need a little help, let me explain my problem.

 

I have a website where user can fill out some stuff and then send it to database.

Problem is the connection to the database can be done in Node.js, but i don't really know how to connect it with the javascript or the html button, or simply how to do it, because i'm myself just learning in Node.js. 

 

It is my school project and i only have 26days left to complete it (still got lot of work to do). 

I appreciate anyone who can help, or even be with me in touch if i would need some help.

If you need more information feel free to ask for it.

Thanks everyone for any help.

Link to comment
Share on other sites

Link to post
Share on other sites

I don't know how to help you without doing the assignment for you... look up tutorials for frontend/backend interactions in Node. Ideally the frontend should send the data to the server which then saves it to the database.

Don't ask to ask, just ask... please 🤨

sudo chmod -R 000 /*

Link to comment
Share on other sites

Link to post
Share on other sites

But how to send it to the server (node.js i guess?)

Link to comment
Share on other sites

Link to post
Share on other sites

i am just thinking about dumping the whole node.js and using php instead

Link to comment
Share on other sites

Link to post
Share on other sites

56 minutes ago, feisi200 said:

i am just thinking about dumping the whole node.js and using php instead

That's not way to learn. 

 

Look up express and mongoose. Super simple to set up and get running. 

Getting late here but I'll be about tomorrow if you want to ask any questions. 

 

 

Been developing apis for a financial Crm for over 2nyears now, node is great though I might be biased lol

                     ¸„»°'´¸„»°'´ Vorticalbox `'°«„¸`'°«„¸
`'°«„¸¸„»°'´¸„»°'´`'°«„¸Scientia Potentia est  ¸„»°'´`'°«„¸`'°«„¸¸„»°'´

Link to comment
Share on other sites

Link to post
Share on other sites

yeah i am using express now, thanks.

Well i know it's not the way to learn, but my requirements for the project is just 800 JavaScript lines and it felt in the time i don't have enough time to deal with node.js. But now it make obviously wasy more sence.

Link to comment
Share on other sites

Link to post
Share on other sites

1 hour ago, feisi200 said:

yeah i am using express now, thanks.

Well i know it's not the way to learn, but my requirements for the project is just 800 JavaScript lines and it felt in the time i don't have enough time to deal with node.js. But now it make obviously wasy more sence.

line requirements are dumb, one should not be judged on the amount of lines written. its a pointless metric.

feel free to drop me a message or @vorticalbox me in a reply :) happy to help.

                     ¸„»°'´¸„»°'´ Vorticalbox `'°«„¸`'°«„¸
`'°«„¸¸„»°'´¸„»°'´`'°«„¸Scientia Potentia est  ¸„»°'´`'°«„¸`'°«„¸¸„»°'´

Link to comment
Share on other sites

Link to post
Share on other sites

it is dumb, but 800 lines isn't that much, but yeah, you can do it easier and they just wants you to use more lines. 

If i will need help i'l write you, thank you, appreciate it.

Link to comment
Share on other sites

Link to post
Share on other sites

On 4/22/2020 at 7:25 AM, feisi200 said:

it is dumb, but 800 lines isn't that much, but yeah, you can do it easier and they just wants you to use more lines. 

If i will need help i'l write you, thank you, appreciate it.

Minify your JS file.. all functions name and variable will be 1 or 2  chars, remove all comments, and everything in a single line. So there you go, 1 line code assignment.

Of course the TA or Teacher won't be able to read it and might give you 0, but hey, if you want a fight, there you go. :)

 

But if it were my guess, I think the teacher wanted you to understand the concept of middleware, where you don't need to re-invent the wheel for modules (like Express) and use those instead, reducing the line count. If it were my guess, the teacher probably did the assignment in 600 or so lines, gives you 800 "just in case" you need to spread things.

 

My advice, is focus on making your assignment work properly, and then focus on the line counts. Just keep in mind what is cool with NodeJS, is that you have a library/module (whatever you want to call it) for just about anything. I highly doubt that your teacher will remove points because you at 805 lines.. but if it comes to that, then we might be able to help.

 

Best of luck!

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×