forked from michaelJustin/daraja-framework
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4762f4a
commit 6935894
Showing
4 changed files
with
84 additions
and
65 deletions.
There are no files selected for viewing
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
(* | ||
Daraja Framework | ||
Copyright (C) Michael Justin | ||
This program is free software: you can redistribute it and/or modify | ||
it under the terms of the GNU Affero General Public License as published by | ||
the Free Software Foundation, either version 3 of the License, or | ||
(at your option) any later version. | ||
This program is distributed in the hope that it will be useful, | ||
but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
GNU Affero General Public License for more details. | ||
You should have received a copy of the GNU Affero General Public License | ||
along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
You can be released from the requirements of the license by purchasing | ||
a commercial license. Buying such a license is mandatory as soon as you | ||
develop commercial activities involving the Daraja framework without | ||
disclosing the source code of your own applications. These activities | ||
include: offering paid services to customers as an ASP, shipping Daraja | ||
with a closed source product. | ||
*) | ||
|
||
unit MainUnit; | ||
|
||
interface | ||
|
||
procedure Demo; | ||
|
||
implementation | ||
|
||
uses | ||
LoginResource, LogoutResource, | ||
djServer, djWebAppContext; | ||
|
||
procedure Demo; | ||
var | ||
Server: TdjServer; | ||
Context: TdjWebAppContext; | ||
begin | ||
Server := TdjServer.Create(80); | ||
try | ||
Context := TdjWebAppContext.Create('', True); | ||
Context.Add(TLoginResource, '/index.html'); | ||
Context.Add(TLogoutResource, '/logout'); | ||
Server.Add(Context); | ||
Server.Start; | ||
WriteLn('Server is running, please open http://localhost/index.html'); | ||
WriteLn('Hit any key to terminate.'); | ||
ReadLn; | ||
finally | ||
Server.Free; | ||
end; | ||
end; | ||
|
||
end. |