1. install raspberrian image into micro sd card Note: I used '2018-11-13-raspbian-stretch.img' via balenaEtcher 2. In case you don't have external keyboard but you have mouse. It needs to set wifi ssid/password via config file. - Create file 'wpa_supplicant.conf' and add text as following into the file and save it to microsdcard country=US ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev update_config=1 network={ ssid="wifissid" scan_ssid=1 psk="wifipassword" key_mgmt=WPA-PSK } 3. Turn on ssh via create ssh file or use raspberry destop > preference config 4. If you need to write down a python code related bluetooth. You need to install bluepy > sudo apt-get install python-pip libglib2.0-dev > sudo pip install bluepy > sudo hcitool lescan //get mac address Reference [0] How to install raspberry [1] Install Bluepy [2] Raspberry Document [3] Startup Bluetooth on Raspberry PI
1. First of all, you have to create private & public key - Install the system-specific openssl from this link . - Create openssl.cfg http://www.flatmtn.com/article/setting-openssl-create-certificates.html - Set the following variable : set OPENSSL_CONF=LOCATION_OF_SSL_INSTALL\bin\openssl.cfg Update the path : set Path=...Other Values here...;LOCATION_OF_SSL_INSTALL\bin - Run > openssl req -x509 -out localhost.crt -keyout localhost.key -newkey rsa:2048 -nodes -sha256 - Double click at localhost.crt 2. Create "server.js" const { createServer } = require('https'); const { parse } = require('url'); const next = require('next'); const fs = require('fs'); const dev = process.env.NODE_ENV !== 'production'; const app = next({ dev }); const handle = app.getRequestHandler(); const httpsOptions = { key: fs.readFileSync('./certificates/localhost.key'), cert: fs.readFileSync('./certif...
It is a web application framework. Install go to the directory of app > mkdir api > cd api > npm init > npm install express --save > node app.js Or install via Express Generator generator tool, express-generator , to quickly create an application skeleton. #1 The express-generator package installs the express command-line tool. Use the following command to do so: npm install express-generator -g cd .. //go to parent path #2 For example, the following creates an Express app named api . The app will be created in a folder named api in the current working directory and the view engine will be set to Pug : express --view=pug api #3 Then install dependencies: $ cd myapp $ npm install #4 Run the app > set DEBUG=myapp:* & npm start In case, need to monitor change install nodemode > npm i -g nodemod > nodemon app.js //instead of calling npm start //Nodemon will watching for changing ...
Comments
Post a Comment