| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758 |
- import { database } from "../assets/database.js";
- const sample = {
- "project": {
- "name": "Sample test project",
- "description": "This is super simple test project."
- },
- "submissions": {
- "First": {
- "description": "This is first test submission.",
- "picture": "thumbnail_1.png",
- "elements": {
- "what": {
- "description": "This is element named 'What'.",
- "pictures": [
- "what_1.png",
- "what_2.png",
- "what_3.png"
- ],
- "meshes": [
- "mesh_a.stl",
- "mesh_b.stl"
- ],
- "solids": [
- "solid_a.step",
- "solid_b.step"
- ],
- "order": [
- "https://allegro.pl/show/item_a",
- "https://e-bay.com/x/y"
- ]
- },
- "is": {},
- "it": {}
- }
- },
-
- "Second": {
- "description": "This is second test submission.",
- "picture": "thumbnail_2.png",
- "elements": {
- "mini": {},
- "maxi": {}
- }
- }
- }
- };
- console.log("Loading database...");
- try {
- const test_db = new database(sample);
- } catch (exception) {
- console.error(exception);
- }
- console.log("Database loaded.");
|