I have an idea for a web application where a user can submit Javascript code that can then be served up to other users. I’m wondering what’s the best way of going about this. Is it possible to store the Javascript in a database and then serve it up to users as they request it? I would also like to be able to attach metadata to each piece of code: name, user ratings, etc., so a database seems like the natural solution to my somewhat underinformed mind. I’m looking at using Rails on the backend with MongoDB.
Share
Javascript is a string of text. Databases can store strings of text. Hence, databases can store Javascript.
Unless you have some specific idea I’m missing though,I wholly agree with @Aircule’s sentiment.