I dont know why i don't have any result on my console, i made my package.json map with index.js
PS: I put it in the root of my project
package.json:
{
"name": "MyProject",
"version": "0.1.0",
"private": true,
"main": "index.js",
"scripts": {
"start": "node server/index.js",
"dev": "nodemon server/index.js",
"serve": "vue-cli-service serve",
"build": "vue-cli-service build",
"lint": "vue-cli-service lint"
},
"dependencies": {
"axios": "^0.25.0",
"body-parser": "^1.19.2",
"core-js": "^3.6.5",
"cors": "^2.8.5",
"express": "^4.17.3",
"moment": "^2.29.1",
"mongoose": "^6.2.3",
"pinia": "^2.0.0-rc.10",
"vue": "^3.0.0",
"vue-router": "^4.0.12"
},
My index.js
import axios from "axios";
const response = axios.get("http://jsonplaceholder.typicode.com/posts");
console.log(response);
On my terminal when i type npm run serve
App running at:
- Local: http://localhost:8080/
- Network: http://192.168.1.17:8080/
Note that the development build is not optimized.
To create a production build, run npm run build.
...but nothing on my console