/rats_deployment

A "multiplayer" Story Creator made with the MEAN stack.

Primary LanguageTypeScript

Story Creator

A story creator updated in real time as people submit words one by one. Created in the MEAN stack with sockets. Includes simple admin control to clear the story.

Image Preview Of Story Creator

Code Snippet

Creating a new word post! Sending a post request to our server while also emitting through sockets:

create(word: Word){
  const headers = new Headers({ "Content-Type": "application/json" })
  const options = new RequestOptions({ headers: headers })

  this.http.post("/create", word, options)
    .subscribe(response => this.get_words())
  this.sendMessage(word.word, word.creator, new Date());
}

sendMessage(message, message2, message3){
  this.socket.emit('add-message', message, message2, message3);
}

Built With

Author

  • Peter Amin Felton - Project Development - petfelt.

License

This project is licensed under the MIT License.

Acknowledgments

  • A Couple Of Friends - For getting a kick out of this project.
  • My Father - For consistent encouragement.