Help with.. everything

You’ll need to set up express to handle the post and then save request.
Have a look at this:

1 Like

The project is a nodeJS express thingy

r u online?

Yep. So you need to follow the tutorial now to use express to handle the form inputs

1 Like

It’s ok. i just need to find a way so that when you upload it, it gets into the assets folder.

Don’t think that exists yet, but you can vote for that here:

1 Like

You can still save it to the project, just not the assets folder

can i save them in a github repository?

Why??? Save them in the project. Like a folder called /videos

1 Like

It’s not a static site, would it still work if i make a folder with no parent directory?

If you served the videos using the server.js file or make the videos folder public:

1 Like

I said no parent directory, i can’t make it in the public folder.
Ok, thanks! :slight_smile:
But would that make the server crash?

Sorry. What? If you use that code it makes /videos public and people can view the videos inside that folder from a url. What do you mean by parent directory?

1 Like

ugh nevermind that’s not what i’m trying to do.

Well if you don’t make it static you won’t be able to easily show the video on your site with the <video tag

You know I’ve always been curious - what’s the point of Mongoose?

Type safety. All the way. Basically putting trust into the data that is stored in the database, it’s about knowing what data you have in different colections (tables).

Here’s a good read.


Thank you :slight_smile:

To interact with a MongoDB database - you can get a free one with MongoDB Atlas or host it yourself (not on Glitch though). MongoDB have their own node package called mongodb but everyone uses mongoose. I thinks it’s maintained more regularly.