Giter Club home page Giter Club logo

meme-generator's Introduction

MemeMuc Launcher

This repository is a template to unify the meme generator bonus project submissions for the Online Multimedia Lecture in the winter semester 2023/24 at LMU Munich.

Any submission must be runnable without additional adaptions by executing

cd mememuc-launcher && npm run installall && npm start

The template contains two folders that are relevant to you. Your implementation is supposed to go in these two folders.

  • ./node-backend: The backend of your project using NodeJS
  • ./react-frontend: The frontend of your project using React

Currently, both folder are filled with some dummy projects.

When you replace the ./node-backend dummy project with your own implementation, there are two pieces of code which you need to re-include from the dummy project:

  • In app.js: The block at the very top, commented with Important
    const MONGODB_PORT = process.env.DBPORT || '27017';
    const db = require('monk')(`127.0.0.1:${MONGODB_PORT}/omm-2223`); // connect to database omm-2223
    console.log(`Connected to MongoDB at port ${MONGODB_PORT}`)
  • In package.json: The scripts block
    "scripts": {
      "startdev": "node ./bin/www",
      "start": "SET DBPORT=65535 && node ./bin/www"
    },

The other two folders must not be changed!

  • ./mememuc-launcher contains configuration files for installing dependencies and launching the application you implement.
  • ./mongoserver cotains a local in-memory database server independent of any existing local installation. This database is not persistent and will reset with each restart. It is meant for testing your submission with a consistent data state, independent of the computer on which it runs. You can add files to the ./mongoserver/data subdirectory.

Regarding the other two folder, node-backend and react-frontend, you are free to edit everything. However if you want to use a database and include demodata in your submission, it makes sense to stick to the code that connects the backend to the in-memory database (see comments at the top of node-backend/app.js)

How To Use

During Development

During development we recommend to run the two projects (./node-backend and ./react-frontend) individually. However if you prefer, you can use the NodeJS scripts from ./mememuc-launcher during development too, with the following commands:

cd mememuc-launcher

navigates your commandline into the mememuc launcher project

npm run installall

installs the dependencies of all (sub)projects

npm run startdev

starts the backend project. It will connect to a local MongoDB instance (assuming any is running on your local machine) at the default port 27017.

How To Prepare Your Submission

  • Export the MongoDB database state that you want us to user for evaluating your submission from your local MongoDB as bson files using mongodump, e.g.: mongodump mongodb://127.0.0.1:27017 --db=omm-ws2223
  • Place all created *.bson and *.metadata.json files in mongoserver/data
  • The in-memory database server (./mongoserver) will import these files as default data whenever you (re)launch the project.

How We Will Test Your Submission

To evaluate your submission, we will launch the following commands:

cd mememuc-launcher # Navigates your commandline into the mememuc launcher project.
npm run installall # Installs the dependencies of all (sub)projects.
npm start # Starts the backend project using the non-persistent in-memory MongoDB instance.

meme-generator's People

Contributors

elordin avatar flo890 avatar kai0711er avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.