- Write an HTTP server that responds with a message saying "Hello World"
- Write an HTTP server that returns a list of cities around the world when a HTTP request is made to it with a
GET
method, and a path of/cities
. The server should also allow you makePOST
request with a path/cities
and a body, and respond with the details of the request; it'sheaders
,method
,url
andbody
.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const personalize_msg = (Name, _ending) => { | |
const ending = _ending || '.' | |
const message = "you are great" | |
return `${Name}, ${message}${ending}` | |
} | |
personalize_msg("Anonymous", '!') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | |
package="com.sample.broadcastreceiver"> | |
<uses-permission android:name="android.permission.READ_PHONE_STATE" /> | |
<uses-permission android:name="android.permission.READ_CALL_LOG" /> | |
<application | |
android:allowBackup="true" | |
android:icon="@mipmap/ic_launcher" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | |
package="com.chronotechlabs.broadcastreceiver"> | |
<uses-permission android:name="android.permission.READ_PHONE_STATE" /> | |
<uses-permission android:name="android.permission.READ_CALL_LOG" /> | |
<application | |
android:allowBackup="true" | |
android:icon="@mipmap/ic_launcher" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Assignment | |
Fork this [repo](https://github.com/mrfoh/timeoff-backend) for the timeoff backend app, as this will serve a foundation for | |
the backend for your Timeoff application | |
1. Maintaining the current structure, create new migrations for the following tables; | |
a. users with the following columns; first_name, last_name, email, password, timestamps | |
b. requests; user_id, organization_id, employee_id, request_type(type of timeoff), start_date, end_date, status(status of the request), timestamps | |
2. Define models for the |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## Assignment 1 | |
Write a nodeJS server using ExpressJs that; | |
1. Serves the Timeoff frontend app when the "/" is request via a HTTP GET request | |
2. Add a route "/holidays" to the server that makes an external HTTP request to [Holiday API](https://holidayapi.com/) to get public holidays | |
for the current month in Nigeria. | |
Submit a link to your Timeoff project github repo [here!](https://forms.gle/b4vXNTBYTmnc66x5A) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// Regular Expression for URL validation | |
// | |
// Author: Diego Perini | |
// Created: 2010/12/05 | |
// Updated: 2018/09/12 | |
// License: MIT | |
// | |
// Copyright (c) 2010-2018 Diego Perini (http://www.iport.it) | |
// |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ "lat": 6.70153,"lng": 3.2792 }, | |
{ "lat": 6.65105,"lng": 3.26132 }, | |
{ "lat": 6.60603,"lng": 3.25238 }, | |
{ "lat": 6.52963,"lng": 3.22319 }, | |
{ "lat": 6.4539,"lng": 3.10422 }, | |
{ "lat": 6.40272,"lng": 3.14731 }, | |
{ "lat": 6.39516,"lng": 3.34508 }, | |
{ "lat": 6.39967,"lng": 3.40722 }, | |
{ "lat": 6.42124,"lng": 3.45357 }, |