“”time””:””+timeString+””}””

CS340 Southern New Hampshire MongoDB Project Hi,I need help with MongoDB…………Thanks, CS 340 Milestone Two Guidelines and Rubric
Overview: For this assignment, you will implement a basic RESTful web service using either Python or Java. You will use the language-specific web services
framework to implement the RESTful service. You will later build upon this simple RESTful service implementation for your final project. Make sure you are using
the same programming language you chose in Module Four, as this assignment will build on the work you completed for Milestone One.
Reminders
•
•
Make sure you complete either the Java or the Python REST service tutorial in your Codio
terminal before you start this assignment.
Type all Python code into your Codio terminal manually, especially when running the
Python example code below. Python is space-sensitive and does not copy into the Codio
terminal well.
Prior to completing the prompt for this assignment, run the following code in your chosen language.
Create a basic web service using the RESTful design pattern to implement the following URI example:
http://localhost/currentTime
The above URI should return the current server system time in the following JSON format text:
{ date : MM-DD-YYYY , time : HH:MM:SS }
Example Python Code
#!/usr/bin/python
import json
from bson import json_util
import bottle
from bottle import route, run, request, abort
# set up URI paths for REST service
@route(‘/currentTime’, method=’GET’)
def get_currentTime():
dateString=datetime.datetime.now().strftime(“%Y-%m-%d”)
timeString=datetime.datetime.now().strftime(“%H:%M:%S”)
string=”{“date””:””+dateString+””

Don't use plagiarized sources. Get Your Custom Essay on
“”time””:””+timeString+””}””
For $10/Page 0nly
Order Essay
Calculator

Calculate the price of your paper

Total price:$26

Need a better grade?
We've got you covered.

Order your paper