Node with MongoDB, back-end for Sencha Ext JS 6 client: https://github.com/savelee/docker-ext-client
10K+
This is an example of a Node.js user application, with Express, MongoDb and Passport user authentication.The code can be found on Github: https://github.com/savelee/docker-ext-client, https://hub.docker.com/r/savelee/docker-ext-client/
This code provides a REST webservice. It becomes handy, when using a client application. For this example, I used this Ext JS 6 client app: https://github.com/savelee/docker-ext-client
$ docker pull savelee/docker-node-server
$ docker run --name nodeapp -p 9000:9000 -d savelee/docker-node-server
This application doesn't do much without a proper back-end. We can serve this with a valid Node.js, Express, MongoDB server.
The code can be found here:
https://github.com/savelee/docker-node-server
Run with nodemon app.js
To create an admin account, use Curl or Postman:
$ curl -H "Content-Type: application/json" -X POST -d '{ "username" : "admin", "password": "admin" }' http://127.0.0.1:9000/register
We will use this client: https://github.com/savelee/docker-ext-client
You will need to edit the app/utils/Contants.js file to:
Ext.define('Client.utils.Constants', {
singleton: true,
'LIVE_URL': window.location.protocol + "//" + window.location.host + ':9000',
'TOKEN_PREFIX': '',
'DISABLE_TOKEN': false
});
Then you can start the Ext JS app locally with:
sencha app watch
Open your browser, and browse to: http://127.0.0.1:1841, and login with your admin account.
First make an Ext JS build:
sencha app build
Create a docker-compose.yml
client:
build: ./client
restart: always
ports:
- "80:80"
links:
- server
server:
build: ./server
restart: always
ports:
- "9000:9000"
links:
- mongo
mongo:
image: mongo
command: --smallfiles
restart: always
ports:
- "27017:27017"
Content type
Image
Digest
Size
251.9 MB
Last updated
over 10 years ago
docker pull savelee/docker-node-server