Coder Social home page Coder Social logo

umm-csci-3601 / production-template-s19 Goto Github PK

View Code? Open in Web Editor NEW
0.0 6.0 1.0 1.53 MB

Starting point for Spring, 2019, Software Design and Development projects

License: MIT License

TypeScript 59.75% JavaScript 2.36% CSS 1.49% HTML 8.29% Java 27.64% Shell 0.48%

production-template-s19's Introduction

Production template, S19

Build Status

This is your starter code for Iteration 1.

We've left a number of bits and pieces in here to give you some starter materials, but you should definitely clean out things you don't need, including Markdown files, JSON data files, and the like.

Table of Contents

Setup

As in the previous labs, you'll be using IntelliJ. Once you've all joined your group using GitHub classroom, you can clone your repository using IntelliJ:

  • When prompted to create a new IntelliJ project, select yes.
  • Select import project from existing model and select Gradle.
    • Make sure Use default Gradle wrapper is selected.
  • Click Finish.
  • If IDEA asks you if you want to compile TypeScript to JavaScript ๐Ÿ”ฅ DO NOT ๐Ÿ”ฅ it will break your project.

โš ๏ธ IDEA will sometimes decide to "help" you by offering "Compile TypeScript to JavaScript?" โ€ผ๏ธ Never say "OK" to this offer -- if you do it will make a complete mess of your project. We're using other tools (gradle, ng, and a thing called webpack which you never explicitly see) to do that compilation. If you let IDEA do it, you'll have a ton of JavaScript files cluttering up your project and confusing other tools.

Running your project

  • The familiar run Gradle task will still run your SparkJava server. (which is available at localhost:4567)
  • The build (or its' alias buildExecutable) task will still build the entire project (but not run it)
  • The runClient task will build and run the client side of your project (available at localhost:9000)

The major difference between this lab and lab #3 is that, here, your data (users and todos) will be stored in a database rather than as "flat" JSON files within the server source code.

For the most part, you will be using a local installation of Mongo as a dev (development) database. You don't really need to worry about how this is set up, but you do need to know a couple of tricks to help you use it:

  • To load new seed data into your local dev database, use the gradle task: seedMongoDB.
  • Seed data is stored in the correspondingly named JSON files at the top level (e.g., users.seed.json).

โ— Pro-tip: IntelliJ comes with a nice view to see the mongo databases setup. To access this click on File -> Settings -> Plugins, type Mongo and make sure the Mongo Plugin is installed. Now head to View -> Tool Windows -> Mongo Explorer. Then use the tool icon to add configuration. Once prompted type for Path to Mongo Shell: "/usr/bin/mongo" and hit the green โž•, to add your label and, huzzah!, Mongo Explorer is on your side bar.

Testing and Continuous Integration

Testing options are still integrated in this lab so you can test the client, or the server or both. Testing client:

  • runAllTests runs both the server tests and the clients tests once.
  • runClientTests runs the client tests once.
  • runClientTestsAndWatch runs the client tests every time that the code changes after a save.
  • runClientTestsWithCoverage runs the client tests (once?) and deposits code coverage statistics into a new directory within client called coverage. In there you will find an index.html. Right click on index.html and select Open in Browser with your browser of choice. For Chrome users, you can drag and drop index.html onto chrome and it will open it.
  • runE2ETest runs end to end test for the client side. What are e2e tests? They are tests that run the real application and simulate user behavior. They assert that the app is running as expected. NOTE: Two Gradle tasks must be run before you can run the e2e tests. The server (run) needs to be on for this test to work, and you have to run the seedMongoDB task before running the e2e tests!
  • runServerTests runs the server tests.

Turn on your repo in Travis CI, replace the build status image in this README, and push your changes. That will trigger a build with Travis.

Resources

Angular 5

SparkJava

MongoDB

production-template-s19's People

Contributors

bushw011 avatar danfrz avatar dependabot-support avatar devshawn avatar floogulinc avatar joethe avatar kklamberty avatar nickplucker avatar nicmcphee avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

Forkers

floogulinc

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.