Giter Site home page Giter Site logo

perfectexamples / perfect-session-memory-demo Goto Github PK

View Code? Open in Web Editor NEW
2.0 4.0 1.0 22 KB

Perfect Session Demo using the in-memory driver

License: Apache License 2.0

Swift 100.00%
server-side-swift swift perfect-sessions sessions perfect authentication

perfect-session-memory-demo's Introduction

Perfect Sessions Demo, Memory Driver 简体中文

Get Involed with Perfect!

Star Perfect On Github Stack Overflow Follow Perfect on Twitter Join the Perfect Slack

Swift 3.0 Platforms OS X | Linux License Apache PerfectlySoft Twitter Slack Status

This demo shows usage of Perfect Sessions with the Memory Driver.

Compatibility with Swift

The master branch of this project currently compiles with Xcode 8.1 or the Swift 3.0.1 toolchain on Ubuntu.

Building & Running

This project demonstrates the sessions by setting a very short (10 second) session idle expiry timeout.

The Session ID and stored session data is displayed on the page. Refresh the page to see more random data added to the session. Wait for over 10 seconds and refresh, a new session is started and displayed.

Xcode

We suggest using the Perfect Assistant for managing Server Side Swift projects.

In Perfect Assistant, click "Create New Project", and select "Custom repository URL". Choose a location for the project, and enter this URL for "Repository URL": https://github.com/PerfectExamples/Perfect-Session-Memory-Demo.git

Once the project has been created, click the "Build > Local" button. This will download all dependencies and create an Xcode Project file for you.

Open this project file, then select the "Executable" scheme (with the black icon).

Now, run the project.

Terminal

The following will clone and build an empty starter project and launch the server on port 8181.

git clone https://github.com/PerfectExamples/Perfect-Session-Memory-Demo.git
cd Perfect-Session-Memory-Demo
swift build
.build/debug/Perfect-Session-Memory-Demo

You should see the following output:

Starting HTTP server on 0.0.0.0:8181 with document root ./webroot

This means the server is running and waiting for connections. Access http://localhost:8181/ to see the greeting. Hit control-c to terminate the server.

Issues

We are transitioning to using JIRA for all bugs and support related issues, therefore the GitHub issues has been disabled.

If you find a mistake, bug, or any other helpful suggestion you'd like to make on the docs please head over to http://jira.perfect.org:8080/servicedesk/customer/portal/1 and raise it.

A comprehensive list of open issues can be found at http://jira.perfect.org:8080/projects/ISS/issues

Further Information

For more information on the Perfect project, please visit perfect.org.

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.