A simple .NET Core MVC WebSocket project with a simple angular2 websocket client (from angular2-seed). Additional Ionic2 sample added.
The client is from Angular2-seed, which details how to get that project running.
Angular2: The home page looks at an external websocket service. The 'about' page looks at our MVC websocket handler. Hint: If you add '[all]'... in the textbox, it should broadcast to all connected clients, otherwise the response will only return to the sender. You will need separate browsers (or incognito) to test broadcast
Ionic2: The home page looks at an external websocket service. It does not connect to the MVC service
- Clone the repository.
- Open 'angular2-seed-MvcServerWebsockets' in Visual Studio. You may need to install .NET Core separately.
- Hit Run.
- Clone or fork this repository
- Make sure you have node.js installed version 5+
- Make sure you have NPM installed version 3+
WINDOWS ONLY
runnpm install -g webpack webpack-dev-server typescript
to install global dependencies- run
npm install
to install dependencies - run
npm start
to fire up dev server - open browser to
http://localhost:3000
- if you want to use other port, open
package.json
file, then change port in--port 3000
script
- Follow the start tutorial to get Ionic2 installed
- cd to the project directory.
- Run
ionic serve
To create your key, use these instructions
Add Android
cordova platform add android --save
Publish
cd "{ProjectDir}"
cordova build android --prod --release
jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore "{ProjectDir}/platforms/android/build/outputs/apk/my-release-key.keystore" -storepass {KEY} -keypass {KEY} "{ProjectDir}/platforms/android/build/outputs/apk/android-release-unsigned.apk" {KEY}
jarsigner -verify -verbose -certs "{ProjectDir}/platforms/android/build/outputs/apk/android-release-unsigned.apk"
cd to zipalign
cd C:/Program Files (x86)/Android/android-sdk/build-tools/23.0.1
zipalign -v 4 "{ProjectDir}/platforms/android/build/outputs/apk/android-release-unsigned.apk" "{ProjectDir}/platforms/android/build/outputs/apk/android-release-signed.apk"