database.js 886 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. import { database } from "../assets/database.js";
  2. const sample = {
  3. "project": {
  4. "name": "Sample test project",
  5. "description": "This is super simple test project."
  6. },
  7. "submissions": {
  8. "First": {
  9. "description": "This is first test submission.",
  10. "picture": "thumbnail_1.png",
  11. "elements": {
  12. "what": {},
  13. "is": {},
  14. "it": {}
  15. }
  16. },
  17. "Second": {
  18. "description": "This is second test submission.",
  19. "picture": "thumbnail_2.png",
  20. "elements": {
  21. "mini": {},
  22. "maxi": {}
  23. }
  24. }
  25. }
  26. };
  27. console.log("Loading database...");
  28. try {
  29. const test_db = new database(sample);
  30. } catch (exception) {
  31. console.error(exception);
  32. }
  33. console.log("Database loaded.");